mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #10372 - dzbarsky:rmAttrNS, r=Ms2ger
Implement nodeName on Attr <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10372) <!-- Reviewable:end -->
This commit is contained in:
commit
ca3d120f4a
6 changed files with 9 additions and 79 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue