This commit is contained in:
Pierre Ossman 2017-06-08 10:43:53 +02:00
commit 55b459b479
12 changed files with 34 additions and 34 deletions

View File

@ -9,7 +9,7 @@
// Fallback for all uncought errors
function handleError (event, err) {
try {
const msg = document.getElementById('noVNC_fallback_errormsg');
var msg = document.getElementById('noVNC_fallback_errormsg');
// Only show the initial error
if (msg.hasChildNodes()) {

View File

@ -21,7 +21,7 @@ import RFB from "../core/rfb.js";
import Display from "../core/display.js";
import * as WebUtil from "./webutil.js";
const UI = {
var UI = {
connected: false,
desktopName: "",

View File

@ -206,7 +206,7 @@ export function injectParamIfMissing (path, param, value) {
// will receive either an event or an error on failure.
export function fetchJSON(path, resolve, reject) {
// NB: IE11 doesn't support JSON as a responseType
const req = new XMLHttpRequest();
var req = new XMLHttpRequest();
req.open('GET', path);
req.onload = function () {

View File

@ -19,7 +19,7 @@ import KeyTable from "./keysym.js";
// Keyboard event handler
//
const Keyboard = function (defaults) {
function Keyboard(defaults) {
this._keyDownList = {}; // List of depressed keys
// (even if they are happy)
this._pendingKey = null; // Key waiting for keypress
@ -276,7 +276,7 @@ make_properties(Keyboard, [
['onKeyEvent', 'rw', 'func'] // Handler for key press/release
]);
const Mouse = function (defaults) {
function Mouse(defaults) {
this._doubleClickTimer = null;
this._lastTouchPos = null;

View File

@ -24,7 +24,7 @@ export function stopEvent (e) {
// Emulate Element.setCapture() when not supported
var _captureRecursion = false;
var _captureElem = null;
const _captureProxy = function (e) {
function _captureProxy(e) {
// Recursion protection as we'll see our own event
if (_captureRecursion) return;
@ -50,11 +50,11 @@ const _captureProxy = function (e) {
};
// Follow cursor style of target element
const _captureElemChanged = function() {
function _captureElemChanged() {
var captureElem = document.getElementById("noVNC_mouse_capture_elem");
captureElem.style.cursor = window.getComputedStyle(_captureElem).cursor;
};
const _captureObserver = new MutationObserver(_captureElemChanged);
var _captureObserver = new MutationObserver(_captureElemChanged);
var _captureIndex = 0;

View File

@ -153,7 +153,7 @@ Localizer.prototype = {
}
for (var i = 0;i < elem.childNodes.length;i++) {
let node = elem.childNodes[i];
var node = elem.childNodes[i];
if (node.nodeType === node.ELEMENT_NODE) {
process(node, enabled);
} else if (node.nodeType === node.TEXT_NODE && enabled) {
@ -166,5 +166,5 @@ Localizer.prototype = {
},
}
export const l10n = new Localizer();
export var l10n = new Localizer();
export default l10n.get.bind(l10n);

View File

@ -1169,7 +1169,7 @@ var loader;
// <script type="module"> support
var anonSources = {};
if (typeof document != 'undefined' && document.getElementsByTagName) {
function handleError(err) {
var handleError = function(err) {
// dispatch an error event so that we can display in errors in browsers
// that don't yet support unhandledrejection
if (window.onunhandledrejection === undefined) {
@ -1195,9 +1195,9 @@ if (typeof document != 'undefined' && document.getElementsByTagName) {
// throw so it still shows up in the console
throw err;
}
};
function ready() {
var ready = function() {
document.removeEventListener('DOMContentLoaded', ready, false );
var anonCnt = 0;
@ -1223,7 +1223,7 @@ if (typeof document != 'undefined' && document.getElementsByTagName) {
}
}
}
}
};
// simple DOM ready
if (document.readyState === 'complete')
@ -1263,12 +1263,12 @@ BrowserESModuleLoader.prototype[RegisterLoader$1.resolve] = function(key, parent
function xhrFetch(url, resolve, reject) {
var xhr = new XMLHttpRequest();
function load(source) {
var load = function(source) {
resolve(xhr.responseText);
}
function error() {
};
var error = function() {
reject(new Error('XHR error' + (xhr.status ? ' (' + xhr.status + (xhr.statusText ? ' ' + xhr.statusText : '') + ')' : '') + ' loading ' + url));
}
};
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
@ -1304,8 +1304,8 @@ var WorkerPool = function (script, size) {
this._jobs = 0;
this.onmessage = undefined;
this._stopTimeout = undefined;
for (let i = 0; i < size; i++) {
let wrkr = new Worker(script);
for (var i = 0; i < size; i++) {
var wrkr = new Worker(script);
wrkr._count = 0;
wrkr._ind = i;
wrkr.onmessage = this._onmessage.bind(this, wrkr);
@ -1321,7 +1321,7 @@ WorkerPool.prototype = {
clearTimeout(this._stopTimeout);
this._stopTimeout = undefined;
}
let wrkr = this._workers[this._ind % this._size];
var wrkr = this._workers[this._ind % this._size];
wrkr._count++;
this._jobs++;
wrkr.postMessage(msg);

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ var loader;
// <script type="module"> support
var anonSources = {};
if (typeof document != 'undefined' && document.getElementsByTagName) {
function handleError(err) {
var handleError = function(err) {
// dispatch an error event so that we can display in errors in browsers
// that don't yet support unhandledrejection
if (window.onunhandledrejection === undefined) {
@ -37,7 +37,7 @@ if (typeof document != 'undefined' && document.getElementsByTagName) {
throw err;
}
function ready() {
var ready = function() {
document.removeEventListener('DOMContentLoaded', ready, false );
var anonCnt = 0;
@ -103,10 +103,10 @@ BrowserESModuleLoader.prototype[RegisterLoader.resolve] = function(key, parent)
function xhrFetch(url, resolve, reject) {
var xhr = new XMLHttpRequest();
function load(source) {
var load = function(source) {
resolve(xhr.responseText);
}
function error() {
var error = function() {
reject(new Error('XHR error' + (xhr.status ? ' (' + xhr.status + (xhr.statusText ? ' ' + xhr.statusText : '') + ')' : '') + ' loading ' + url));
}
@ -144,8 +144,8 @@ var WorkerPool = function (script, size) {
this._jobs = 0;
this.onmessage = undefined;
this._stopTimeout = undefined;
for (let i = 0; i < size; i++) {
let wrkr = new Worker(script);
for (var i = 0; i < size; i++) {
var wrkr = new Worker(script);
wrkr._count = 0;
wrkr._ind = i;
wrkr.onmessage = this._onmessage.bind(this, wrkr);
@ -161,7 +161,7 @@ WorkerPool.prototype = {
clearTimeout(this._stopTimeout);
this._stopTimeout = undefined;
}
let wrkr = this._workers[this._ind % this._size];
var wrkr = this._workers[this._ind % this._size];
wrkr._count++;
this._jobs++;
wrkr.postMessage(msg);

View File

@ -40,6 +40,6 @@ export function flattenChunks (chunks) {
return result;
}
export const Buf8 = Uint8Array;
export const Buf16 = Uint16Array;
export const Buf32 = Int32Array;
export var Buf8 = Uint8Array;
export var Buf16 = Uint16Array;
export var Buf32 = Int32Array;

View File

@ -1834,7 +1834,7 @@ function deflateSetDictionary(strm, dictionary) {
export { deflateInit, deflateInit2, deflateReset, deflateResetKeep, deflateSetHeader, deflate, deflateEnd, deflateSetDictionary };
export const deflateInfo = 'pako deflate (from Nodeca project)';
export var deflateInfo = 'pako deflate (from Nodeca project)';
/* Not implemented
exports.deflateBound = deflateBound;

View File

@ -1514,7 +1514,7 @@ function inflateSetDictionary(strm, dictionary) {
}
export { inflateReset, inflateReset2, inflateResetKeep, inflateInit, inflateInit2, inflate, inflateEnd, inflateGetHeader, inflateSetDictionary };
export const inflateInfo = 'pako inflate (from Nodeca project)';
export var inflateInfo = 'pako inflate (from Nodeca project)';
/* Not implemented
exports.inflateCopy = inflateCopy;