diff options
author | Bruno de Oliveira Abinader <bruno.d@partner.samsung.com> | 2014-02-27 13:14:02 -0400 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno.d@partner.samsung.com> | 2014-03-07 11:10:55 -0400 |
commit | d22dbb53ca4bbbf3867d87f9d80059473bd48880 (patch) | |
tree | 41ca03ce00bad5d31884fca9b97aa755d26e9625 /src/components/script/dom/htmlcollection.rs | |
parent | c768097adc6366dd60319aeaccc4f7e2f883e9f6 (diff) | |
download | servo-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.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 { |