mirror of
https://github.com/servo/servo.git
synced 2025-06-24 09:04:33 +01:00
Implemented {Document,Element}.getElementsByTagName
This commit is contained in:
parent
c768097adc
commit
d22dbb53ca
4 changed files with 11 additions and 6 deletions
|
@ -212,8 +212,8 @@ impl Document {
|
|||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#dom-document-getelementsbytagname
|
||||
pub fn GetElementsByTagName(&self, tag: DOMString) -> JS<HTMLCollection> {
|
||||
self.createHTMLCollection(|elem| elem.get().tag_name == tag)
|
||||
pub fn GetElementsByTagName(&self, abstract_self: &JS<Document>, tag_name: DOMString) -> JS<HTMLCollection> {
|
||||
HTMLCollection::by_tag_name(&self.window, &NodeCast::from(abstract_self), tag_name)
|
||||
}
|
||||
|
||||
// http://dom.spec.whatwg.org/#dom-nonelementparentnode-getelementbyid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue