function foo(){}
function bar(){}
ele.addEventListener('click', foo, false);
ele.addEventListener('click', bar, false);
// the method to list the handlers registered to ele.onclick
foo, bar.
thanks.
--
Best Regards!
Wen Dong
From a web page there is no way no.
You could do something like:
Node.prototype.myAddEventListener(event, handler, capture) {
handlerArray = this.getUserData('handlers');
if (!handlerArray) {
handlerArray = [];
this.setUserData('handlers', handlerArray, null);
}
handlerArray.push(handler);
this.addEventListener(event, handler, capture);
}
Then you can simply call node.getUserData('handlers') to get a list of
all handlers that you've registered. And replace all calls to
addEventListener with myAddEventListener.
/ Jonas