[html5] Propagating custom Events?
org.whatwg at sagar.org
Fri Apr 9 11:49:17 PDT 2010
Was the idea of allowing custom event types ever discussed for HTML5?
Correct me if I'm wrong, but currently the document will only propagate
events of known types (UIEvents MouseEvents MutationEvents HTMLEvents), and
you can't add other event types to propagate via dispatchEvent()?
I was trying to use the addEventListener()/dispatchEvent() model to
mydiv.addEventListener('my_event_1', cb, false);
However, to do this I needed to create an event object (evt) and when I
tried to create an event using document.createEvent() it seemed I could only
use pre-existing event types.
var evt = document.createEvent("ApplicationEvent");
Rik Sagar, San Jose, CA 95124
Visit : http://sagar.org/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Help