mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Implement nodeName on Attr
This commit is contained in:
parent
7f4929d52d
commit
8cbcdfb761
7 changed files with 10 additions and 80 deletions
|
@ -138,6 +138,11 @@ impl AttrMethods for Attr {
|
||||||
DOMString::from(&*self.identifier.name)
|
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
|
// https://dom.spec.whatwg.org/#dom-attr-namespaceuri
|
||||||
fn GetNamespaceURI(&self) -> Option<DOMString> {
|
fn GetNamespaceURI(&self) -> Option<DOMString> {
|
||||||
let Namespace(ref atom) = self.identifier.namespace;
|
let Namespace(ref atom) = self.identifier.namespace;
|
||||||
|
|
|
@ -17,12 +17,14 @@ interface Attr {
|
||||||
readonly attribute DOMString localName;
|
readonly attribute DOMString localName;
|
||||||
[Constant]
|
[Constant]
|
||||||
readonly attribute DOMString name;
|
readonly attribute DOMString name;
|
||||||
|
[Constant]
|
||||||
|
readonly attribute DOMString nodeName; // historical alias of .name
|
||||||
[Pure]
|
[Pure]
|
||||||
attribute DOMString value;
|
attribute DOMString value;
|
||||||
[Pure]
|
[Pure]
|
||||||
attribute DOMString textContent; // alias of .value
|
attribute DOMString textContent; // historical alias of .value
|
||||||
[Pure]
|
[Pure]
|
||||||
attribute DOMString nodeValue; // alias of .value
|
attribute DOMString nodeValue; // historical alias of .value
|
||||||
|
|
||||||
[Pure]
|
[Pure]
|
||||||
readonly attribute Element? ownerElement;
|
readonly attribute Element? ownerElement;
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
[Document-createAttribute.html]
|
|
||||||
type: testharness
|
|
||||||
[HTML document.createAttribute("title")]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[XML document.createAttribute("title")]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[HTML document.createAttribute("TITLE")]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[XML document.createAttribute("TITLE")]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[HTML document.createAttribute(null)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[XML document.createAttribute(null)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[HTML document.createAttribute(undefined)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[XML document.createAttribute(undefined)]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[Element-removeAttributeNS.html]
|
|
||||||
type: testharness
|
|
||||||
[removeAttributeNS should take a local name.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
[attributes.html]
|
|
||||||
type: testharness
|
|
||||||
[setAttribute should not change the order of previously set attributes.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[setAttribute should set the first attribute with the given name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[setAttribute should set the attribute with the given qualified name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[null and the empty string should result in a null namespace.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[XML-namespaced attributes don't need an xml prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[xmlns should be allowed as local name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[xmlns should be allowed as prefix in the XMLNS namespace]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[xmlns should be allowed as qualified name in the XMLNS namespace]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Setting the same attribute with another prefix should not change the prefix]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attributes should work in document fragments.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Attribute values should not be parsed.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Specified attributes should be accessible.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[Entities in attributes should have been expanded while parsing.]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
[custom-attrs.html]
|
|
||||||
type: testharness
|
|
||||||
[Setting an Element's dataset property should not interfere with namespaced attributes with same name]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -8036,7 +8036,7 @@
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "createTreeWalker" with the proper type (27)]
|
[Document interface: iframe.contentDocument must inherit property "createTreeWalker" with the proper type (27)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[Document interface: iframe.contentDocument must inherit property "styleSheets" with the proper type (28)]
|
[Document interface: iframe.contentDocument must inherit property "styleSheets" with the proper type (28)]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue