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. // Step 2.
self.elements_iter().find(|elem| { 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)
}) })
} }

View file

@ -3,6 +3,3 @@
[Shouldn't be able to set unsigned properties on a HTMLCollection (strict mode)] [Shouldn't be able to set unsigned properties on a HTMLCollection (strict mode)]
expected: FAIL expected: FAIL
[hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames]
expected: FAIL

View file

@ -1,5 +0,0 @@
[Element-children.html]
type: testharness
[HTMLCollection edge cases 1]
expected: FAIL

View file

@ -3,6 +3,3 @@
[Shouldn't be able to set unsigned properties on a HTMLCollection (strict mode)] [Shouldn't be able to set unsigned properties on a HTMLCollection (strict mode)]
expected: FAIL expected: FAIL
[hasOwnProperty, getOwnPropertyDescriptor, getOwnPropertyNames]
expected: FAIL