mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Short-circuit initFooEvent while dispatching events.
This commit is contained in:
parent
642a3592c7
commit
c23edf6f5a
5 changed files with 23 additions and 4 deletions
|
@ -65,8 +65,12 @@ impl<'a> CustomEventMethods for JSRef<'a, CustomEvent> {
|
|||
can_bubble: bool,
|
||||
cancelable: bool,
|
||||
detail: JSVal) {
|
||||
self.detail.set(detail);
|
||||
let event: JSRef<Event> = EventCast::from_ref(self);
|
||||
if event.dispatching() {
|
||||
return;
|
||||
}
|
||||
|
||||
self.detail.set(detail);
|
||||
event.InitEvent(type_, can_bubble, cancelable);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue