]> git.proxmox.com Git - mirror_novnc.git/blobdiff - core/util/polyfill.js
Use fat arrow functions `const foo = () => { ... };` for callbacks
[mirror_novnc.git] / core / util / polyfill.js
index c991aa2ed14995938ee221e3e0de7a04650a941a..1971edf8d38388531d53e27013a13b51c82cc18c 100644 (file)
@@ -38,8 +38,8 @@ 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 };
         const evt = document.createEvent( 'CustomEvent' );
         evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );