aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno.d@partner.samsung.com>2014-02-27 13:14:02 -0400
committerBruno de Oliveira Abinader <bruno.d@partner.samsung.com>2014-03-07 11:10:55 -0400
commitd22dbb53ca4bbbf3867d87f9d80059473bd48880 (patch)
tree41ca03ce00bad5d31884fca9b97aa755d26e9625 /src/components/script/dom/htmlcollection.rs
parentc768097adc6366dd60319aeaccc4f7e2f883e9f6 (diff)
downloadservo-d22dbb53ca4bbbf3867d87f9d80059473bd48880.tar.gz
servo-d22dbb53ca4bbbf3867d87f9d80059473bd48880.zip
Implemented {Document,Element}.getElementsByTagName
Diffstat (limited to 'src/components/script/dom/htmlcollection.rs')
-rw-r--r--src/components/script/dom/htmlcollection.rs4
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 {