diff options
Diffstat (limited to 'src/components/script/dom/htmlcollection.rs')
-rw-r--r-- | src/components/script/dom/htmlcollection.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/components/script/dom/htmlcollection.rs b/src/components/script/dom/htmlcollection.rs index 3f176f4bc31..b2a8ca0aa02 100644 --- a/src/components/script/dom/htmlcollection.rs +++ b/src/components/script/dom/htmlcollection.rs @@ -46,6 +46,10 @@ impl HTMLCollection { } HTMLCollection::new(window, elements) } + + pub fn by_tag_name(window: &JS<Window>, root: &JS<Node>, tag_name: DOMString) -> JS<HTMLCollection> { + HTMLCollection::create(window, root, |elem| elem.get().tag_name == tag_name) + } } impl HTMLCollection { |