diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-09-27 20:42:40 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-11-06 17:08:14 +0100 |
commit | 8b0f58c8af3fd5f0a328ac9286d2719328cadbd5 (patch) | |
tree | 26e0ae91e926d2ee574edd4b094d8d4f65f9d9b3 /components/script/dom/htmlcollection.rs | |
parent | 42c8fd292a37d61efb56d96bdf5866dd30e77df6 (diff) | |
download | servo-8b0f58c8af3fd5f0a328ac9286d2719328cadbd5.tar.gz servo-8b0f58c8af3fd5f0a328ac9286d2719328cadbd5.zip |
script: Remove HTMLAppletElement.
It was removed from the spec, there's no reason to keep it in tree.
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r-- | components/script/dom/htmlcollection.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index 3da4503cb0e..1d5298a9e47 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -80,6 +80,19 @@ impl HTMLCollection { } } + /// Returns a collection which is always empty. + pub fn always_empty(window: &Window, root: &Node) -> DomRoot<Self> { + #[derive(JSTraceable)] + struct NoFilter; + impl CollectionFilter for NoFilter { + fn filter<'a>(&self, _: &'a Element, _: &'a Node) -> bool { + false + } + } + + Self::new(window, root, Box::new(NoFilter)) + } + #[allow(unrooted_must_root)] pub fn new(window: &Window, root: &Node, filter: Box<CollectionFilter + 'static>) -> DomRoot<HTMLCollection> { reflect_dom_object(Box::new(HTMLCollection::new_inherited(root, filter)), |