From a4472c3553470a19942bc35471fcb9f490c534d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Fri, 2 Aug 2013 15:03:46 +0200 Subject: [PATCH] JSLint. --- skins/ajax_scripts/javascript_events_api.js | 107 ++++++++++---------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/skins/ajax_scripts/javascript_events_api.js b/skins/ajax_scripts/javascript_events_api.js index 7e9e8dd..62ec577 100644 --- a/skins/ajax_scripts/javascript_events_api.js +++ b/skins/ajax_scripts/javascript_events_api.js @@ -61,11 +61,11 @@ function _build_addListener() { var common = function(ob, eventName, listenerFunction, group) { _browserSpecific(ob, eventName, listenerFunction); if (group) { - if(!__groupListeners[group]) - __groupListeners[group] = new Array(); + if(!__groupListeners[group]) { + __groupListeners[group] = [];} __groupListeners[group].push([ob, eventName, listenerFunction]); } - } + }; return common; } @@ -74,33 +74,33 @@ function _build_removeListener() { var _ie_removeListener = function(ob, eventName, listenerFunction) { eventName = "on" + eventName; ob.detachEvent(eventName, listenerFunction); - } + }; return _ie_removeListener; } else if (browser.isDOM2Event) { var _dom2_removeListener = function(ob, eventName, listenerFunction) { ob.removeEventListener(eventName, listenerFunction, false); // only bubbling events :-( - } + }; return _dom2_removeListener; } } removeGroupListeners = function(group) { var listeners = __groupListeners[group]; - var l; - for (var i=0 ; i