Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement nodeName on Attr
  • Loading branch information
dzbarsky committed Apr 3, 2016
1 parent 7f4929d commit 8cbcdfb
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 80 deletions.
5 changes: 5 additions & 0 deletions components/script/dom/attr.rs
Expand Up @@ -138,6 +138,11 @@ impl AttrMethods for Attr {
DOMString::from(&*self.identifier.name)
}

// https://dom.spec.whatwg.org/#dom-attr-nodename
fn NodeName(&self) -> DOMString {
self.Name()
}

// https://dom.spec.whatwg.org/#dom-attr-namespaceuri
fn GetNamespaceURI(&self) -> Option<DOMString> {
let Namespace(ref atom) = self.identifier.namespace;
Expand Down
6 changes: 4 additions & 2 deletions components/script/dom/webidls/Attr.webidl
Expand Up @@ -17,12 +17,14 @@ interface Attr {
readonly attribute DOMString localName;
[Constant]
readonly attribute DOMString name;
[Constant]
readonly attribute DOMString nodeName; // historical alias of .name
[Pure]
attribute DOMString value;
[Pure]
attribute DOMString textContent; // alias of .value
attribute DOMString textContent; // historical alias of .value
[Pure]
attribute DOMString nodeValue; // alias of .value
attribute DOMString nodeValue; // historical alias of .value

[Pure]
readonly attribute Element? ownerElement;
Expand Down
26 changes: 0 additions & 26 deletions tests/wpt/metadata/dom/nodes/Document-createAttribute.html.ini

This file was deleted.

This file was deleted.

41 changes: 0 additions & 41 deletions tests/wpt/metadata/dom/nodes/attributes.html.ini

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion tests/wpt/metadata/html/dom/interfaces.html.ini
Expand Up @@ -8036,7 +8036,7 @@
[Document interface: iframe.contentDocument must inherit property "createTreeWalker" with the proper type (27)]
expected: FAIL
[Document interface: iframe.contentDocument must inherit property "styleSheets" with the proper type (28)]
expected: FAIL
Expand Down

0 comments on commit 8cbcdfb

Please sign in to comment.