1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

novnc ES6 compatibility is not working. I reverse it. Spice/VNC sending ctrl+alt+fn functionality restored.

This commit is contained in:
catborise 2018-08-27 15:30:50 +03:00
parent f73271e677
commit 76e6388ec5
53 changed files with 19018 additions and 17438 deletions

View file

@ -1,5 +1,3 @@
'use strict';
/*
* noVNC: HTML5 VNC client
* Copyright 2017 Pierre Ossman for noVNC
@ -12,12 +10,9 @@
if (typeof Object.assign != 'function') {
// Must be writable: true, enumerable: false, configurable: true
Object.defineProperty(Object, "assign", {
value: function assign(target, varArgs) {
// .length of function is 2
value: function assign(target, varArgs) { // .length of function is 2
'use strict';
if (target == null) {
// TypeError if undefined or null
if (target == null) { // TypeError if undefined or null
throw new TypeError('Cannot convert undefined or null to object');
}
@ -26,8 +21,7 @@ if (typeof Object.assign != 'function') {
for (var index = 1; index < arguments.length; index++) {
var nextSource = arguments[index];
if (nextSource != null) {
// Skip over if undefined or null
if (nextSource != null) { // Skip over if undefined or null
for (var nextKey in nextSource) {
// Avoid bugs when hasOwnProperty is shadowed
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
@ -45,10 +39,10 @@ if (typeof Object.assign != 'function') {
/* CustomEvent constructor (taken from MDN) */
(function () {
function CustomEvent(event, params) {
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent('CustomEvent');
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
@ -57,4 +51,4 @@ if (typeof Object.assign != 'function') {
if (typeof window.CustomEvent !== "function") {
window.CustomEvent = CustomEvent;
}
})();
})();