Fix HTMLCollection::NamedItem

This commit is contained in:
Anthony Ramine 2016-02-23 14:25:19 +01:00
parent 7f36247d03
commit 7696a6bd20
4 changed files with 2 additions and 13 deletions

View file

@ -337,8 +337,8 @@ impl HTMLCollectionMethods for HTMLCollection {
// Step 2.
self.elements_iter().find(|elem| {
elem.get_string_attribute(&atom!("name")) == key ||
elem.get_string_attribute(&atom!("id")) == key
elem.get_string_attribute(&atom!("id")) == key ||
(elem.namespace() == &ns!(html) && elem.get_string_attribute(&atom!("name")) == key)
})
}