Use fat arrow functions const foo = () => { ... }; for callbacks

and any other function that is passed around and it's not a top level function
This commit is contained in:
Juanjo Diaz
2018-07-09 22:47:29 +02:00
parent 0e4808bf6f
commit 651c23ece3
28 changed files with 177 additions and 191 deletions

View File

@@ -229,7 +229,7 @@
rfb.viewOnly = WebUtil.getConfigVar('view_only', false);
rfb.addEventListener("connect", connected);
rfb.addEventListener("disconnect", disconnected);
rfb.addEventListener("capabilities", function () { updatePowerButtons(); });
rfb.addEventListener("capabilities", updatePowerButtons);
rfb.addEventListener("credentialsrequired", credentials);
rfb.addEventListener("desktopname", updateDesktopName);
rfb.scaleViewport = WebUtil.getConfigVar('scale', false);