summaryrefslogtreecommitdiff
path: root/program/js/common.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-12-23 12:47:03 +0100
committerAleksander Machniak <alec@alec.pl>2013-12-23 12:47:03 +0100
commit772bec6789ed4c6ee460577fd567717fac1250d4 (patch)
tree3a2c854c6731552e162a892b5f7cc1155b1365d7 /program/js/common.js
parent7b39845b3a6e7dd9151a41f2026b66b39648d110 (diff)
Make addEventListener() chainable for better performance and compact code
Replace deperecated row_init usage with addEventListener('initrow')
Diffstat (limited to 'program/js/common.js')
-rw-r--r--program/js/common.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/js/common.js b/program/js/common.js
index 14091463f..9c0bb9db3 100644
--- a/program/js/common.js
+++ b/program/js/common.js
@@ -285,7 +285,6 @@ rcube_event_engine.prototype = {
*
* @param {String} Event name
* @param {Function} Handler function
- * @return Listener ID (used to remove this handler later on)
*/
addEventListener: function(evt, func, obj)
{
@@ -295,6 +294,8 @@ addEventListener: function(evt, func, obj)
this._events[evt] = [];
this._events[evt].push({func:func, obj:obj ? obj : window});
+
+ return this; // chainable
},
/**