From 1a15f2290567e08ffbd3441cbe781c70dd7a1637 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Mon, 24 Oct 2016 14:08:53 +0200 Subject: [PATCH] Remove unnecessary anonymous function addEventListener can handle multiple assigned events, no need for a wrapping function. --- app/ui.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/ui.js b/app/ui.js index 6e44492a..7a2698d5 100644 --- 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);