]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP#1086458: add class to manage event listeners
authorGalen Charlton <gmc@esilibrary.com>
Thu, 24 Jan 2013 16:56:30 +0000 (11:56 -0500)
committerBen Shum <bshum@biblio.org>
Mon, 4 Mar 2013 19:49:33 +0000 (14:49 -0500)
commitdf56b77591d1b4c4bd50dfc83d37f10117817b2e
treeabcc32e10023a463b7b1bf2357476d4b55876b8e
parent0910a95da94800da094c81b2efd7fa394c34794c
LP#1086458: add class to manage event listeners

EventListenerList allows one to maintain a list
of event listeners, then remove them all when it's
time to clean up a window.

Usage is:

var list = new EventListenerList();
// attach an event listener
list.add(node, 'command', function(ev) { alert('BOO!'); }, false);
...
// get rid of them
list.removeAll();

Based on an idea by Jason Etheridge.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/xul/staff_client/chrome/content/OpenILS/global_util.js