]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Use the classic `function foo() { ... }` for top level functions or functions that...
authorJuanjo Diaz <juanjo.diazmo@gmail.com>
Mon, 9 Jul 2018 20:48:22 +0000 (22:48 +0200)
committerJuanjo Diaz <juanjo.diazmo@gmail.com>
Thu, 12 Jul 2018 17:06:57 +0000 (19:06 +0200)
po/xgettext-html
tests/playback.js
tests/test.rfb.js

index ddb2cb2988401529f7cabab4e413b316ffc14083..407477bc990ef663698feed35011155489ce7bef 100755 (executable)
@@ -89,11 +89,11 @@ for (let i = 0; i < opt.argv.length; i++) {
     const dom = new jsdom.JSDOM(file, { includeNodeLocations: true });
     const body = dom.window.document.body;
 
-    const locator = (elem) => {
+    function locator(elem) {
         const offset = dom.nodeLocation(elem).startOffset;
         const line = file.slice(0, offset).split("\n").length;
         return fn + ":" + line;
-    };
+    }
 
     process(body, locator, true);
 }
index cac9c8a6c738994a9d44e0a4fc92486d42ce8ca7..c48a2a4e859b44df162ca507721a7714cca841f6 100644 (file)
@@ -24,7 +24,7 @@ if (window.setImmediate === undefined) {
         _immediateFuncs[id];
     };
 
-    const _onMessage = (event) => {
+    window.addEventListener("message", (event) => {
         if ((typeof event.data !== "string") ||
             (event.data.indexOf("noVNC immediate trigger:") !== 0)) {
             return;
@@ -40,8 +40,7 @@ if (window.setImmediate === undefined) {
         delete _immediateFuncs[index];
 
         callback();
-    };
-    window.addEventListener("message", _onMessage);
+    });
 }
 
 export default class RecordingPlayer {
index 3d5bd288104b4a66495d7a9cdb9836b54c66d271..8369a5d8c79f94a46f89988e341d5a39bcdc3c2f 100644 (file)
@@ -23,24 +23,24 @@ import sinon from '../vendor/sinon.js';
     window.UIEvent = UIEvent;
 })();
 
-const push8 = (arr, num) => {
+function push8(arr, num) {
     "use strict";
     arr.push(num & 0xFF);
-};
+}
 
-const push16 = (arr, num) => {
+function push16(arr, num) {
     "use strict";
     arr.push((num >> 8) & 0xFF,
               num & 0xFF);
-};
+}
 
-const push32 = (arr, num) => {
+function push32(arr, num) {
     "use strict";
     arr.push((num >> 24) & 0xFF,
               (num >> 16) & 0xFF,
               (num >>  8) & 0xFF,
               num & 0xFF);
-};
+}
 
 describe('Remote Frame Buffer Protocol Client', function() {
     let clock;