diff options
Diffstat (limited to 'static/lib.js')
-rw-r--r-- | static/lib.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/static/lib.js b/static/lib.js index 79e48f1e..46236411 100644 --- a/static/lib.js +++ b/static/lib.js @@ -3,6 +3,15 @@ General procedures which in theory could be used anywhere. */ +HTMLElement.prototype._addEventListener = HTMLElement.prototype.addEventListener; +HTMLElement.prototype.addEventListener = function (name, proc) { + if (! this.listeners) this.listeners = {}; + if (! this.listeners[name]) this.listeners[name] = []; + this.listeners[name].push(proc); + return this._addEventListener(name, proc); +}; + + /* ----- Date Extensions ---------------------------- */ /* |