Implemented {Document,Element}.getElementsByTagName

This commit is contained in:
Bruno de Oliveira Abinader 2014-02-27 13:14:02 -04:00
parent c768097adc
commit d22dbb53ca
4 changed files with 11 additions and 6 deletions

View file

@ -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 {