// attach a handler to a particular event on an element // in a browser-independent way function registerEventHandler (element, event, handler) { if (element.attachEvent) { // MS registration model element.attachEvent('on' + event, handler); } else if (element.addEventListener) { // NN (W4C) regisration model element.addEventListener(event, handler, false); } else { // old regisration model as fall-back element[event] = handler; } } // get a delegate that refers to an instance method function getInstanceDelegate (obj, methodName) { return( function(e) { e = e || window.event; return obj[methodName](e); } ); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19706 | MikeEheler |
Populate //guest/shawn_hladky/P4.Net/... //guest/MikeEheler/P4.Net/.... |
||
//guest/shawn_hladky/P4.Net/release/1.0/doc/html/scripts/EventUtilities.js | |||||
#1 | 6106 | Shawn Hladky | P4.Net: Branching release 1.0 | ||
//guest/shawn_hladky/P4.Net/main/doc/html/scripts/EventUtilities.js | |||||
#1 | 6105 | Shawn Hladky | P4.Net: Updating documentation output to sandcastle. |