diff options
author | Gregory Terzian <2792687+gterzian@users.noreply.github.com> | 2023-07-19 23:27:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-19 15:27:32 +0000 |
commit | cf9ec700def7b429f67e0c95886a8fb539cbcc6c (patch) | |
tree | b37d9eeb498cf16ec6b09cb480dab4da9ee7a993 /components/script/dom/event.rs | |
parent | 4f4c2a592279631d6313fcc42ef6f998cfba37cd (diff) | |
download | servo-cf9ec700def7b429f67e0c95886a8fb539cbcc6c.tar.gz servo-cf9ec700def7b429f67e0c95886a8fb539cbcc6c.zip |
make the concept of has_listeners_for follow other implementations (#21044)
Co-authored-by: Gregory Terzian <gterzian@users.noreply.github.com>
Diffstat (limited to 'components/script/dom/event.rs')
-rw-r--r-- | components/script/dom/event.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/components/script/dom/event.rs b/components/script/dom/event.rs index 417170eac2e..c5a5835521f 100644 --- a/components/script/dom/event.rs +++ b/components/script/dom/event.rs @@ -138,18 +138,6 @@ impl Event { self.cancelable.set(cancelable); } - // Determine if there are any listeners for a given target and type. - // See https://github.com/whatwg/dom/issues/453 - pub fn has_listeners_for(&self, target: &EventTarget, type_: &Atom) -> bool { - // TODO: take 'removed' into account? Not implemented in Servo yet. - // https://dom.spec.whatwg.org/#event-listener-removed - let mut event_path = self.construct_event_path(&target); - event_path.push(DomRoot::from_ref(target)); - event_path - .iter() - .any(|target| target.has_listeners_for(type_)) - } - // https://dom.spec.whatwg.org/#event-path // TODO: shadow roots put special flags in the path, // and it will stop just being a list of bare EventTargets |