diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/attr.rs | 5 | ||||
-rw-r--r-- | components/script/dom/webidls/Attr.webidl | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index ec7b999f5b9..50a5a754f25 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -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; diff --git a/components/script/dom/webidls/Attr.webidl b/components/script/dom/webidls/Attr.webidl index e90bec8fccd..171715205bc 100644 --- a/components/script/dom/webidls/Attr.webidl +++ b/components/script/dom/webidls/Attr.webidl @@ -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; |