Short-circuit initFooEvent while dispatching events.

This commit is contained in:
Josh Matthews 2014-11-12 14:23:52 -05:00
parent 642a3592c7
commit c23edf6f5a
5 changed files with 23 additions and 4 deletions

View file

@ -219,10 +219,11 @@ impl<'a> EventMethods for JSRef<'a, Event> {
type_: DOMString,
bubbles: bool,
cancelable: bool) {
self.initialized.set(true);
if self.dispatching.get() {
return;
}
self.initialized.set(true);
self.stop_propagation.set(false);
self.stop_immediate.set(false);
self.canceled.set(false);