aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/eventtarget.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/eventtarget.rs')
-rw-r--r--components/script/dom/eventtarget.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/eventtarget.rs b/components/script/dom/eventtarget.rs
index 3f7c96d3a15..2b1ba39c687 100644
--- a/components/script/dom/eventtarget.rs
+++ b/components/script/dom/eventtarget.rs
@@ -397,8 +397,8 @@ impl EventTarget {
})
}
- pub fn dispatch_event(&self, event: &Event) -> EventStatus {
- event.dispatch(self, false)
+ pub fn dispatch_event(&self, event: &Event, can_gc: CanGc) -> EventStatus {
+ event.dispatch(self, false, can_gc)
}
pub fn remove_all_listeners(&self) {
@@ -779,12 +779,12 @@ impl EventTargetMethods for EventTarget {
}
// https://dom.spec.whatwg.org/#dom-eventtarget-dispatchevent
- fn DispatchEvent(&self, event: &Event) -> Fallible<bool> {
+ fn DispatchEvent(&self, event: &Event, can_gc: CanGc) -> Fallible<bool> {
if event.dispatching() || !event.initialized() {
return Err(Error::InvalidState);
}
event.set_trusted(false);
- Ok(match self.dispatch_event(event) {
+ Ok(match self.dispatch_event(event, can_gc) {
EventStatus::Canceled => false,
EventStatus::NotCanceled => true,
})