]> git.proxmox.com Git - mirror_novnc.git/commitdiff
Remove unnecessary anonymous function
authorSamuel Mannehed <samuel@cendio.se>
Mon, 24 Oct 2016 12:08:53 +0000 (14:08 +0200)
committerSamuel Mannehed <samuel@cendio.se>
Mon, 24 Oct 2016 12:08:53 +0000 (14:08 +0200)
addEventListener can handle multiple assigned events, no need for a
wrapping function.

app/ui.js

index 6e44492a958e7e3ed814245be7161b0e2e61c4b9..7a2698d598d0e5fdd33bf8f54af46a7cb694c707 100644 (file)
--- a/app/ui.js
+++ b/app/ui.js
@@ -168,11 +168,9 @@ var UI;
         },
 
         setupWindowEvents: function() {
-            window.addEventListener( 'resize', function () {
-                UI.applyResizeMode();
-                UI.updateViewClip();
-                UI.updateViewDrag();
-            } );
+            window.addEventListener('resize', UI.applyResizeMode);
+            window.addEventListener('resize', UI.updateViewClip);
+            window.addEventListener('resize', UI.updateViewDrag);
 
             document.getElementById("noVNC_status")
                 .addEventListener('click', UI.hideStatus);