mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
Auto merge of #7601 - nox:cleanup-dom-webidls, r=Ms2ger
Improve DOM interfaces' extended attributes Some should have been `[SameObject]` instead of `[Constant]`. The rest of the changes are additional `[Constant]` and `[Pure]` extended attributes on many operations. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7601) <!-- Reviewable:end -->
This commit is contained in:
commit
61267cde63
18 changed files with 75 additions and 21 deletions
|
@ -35,8 +35,9 @@ interface Node : EventTarget {
|
|||
readonly attribute Node? parentNode;
|
||||
[Pure]
|
||||
readonly attribute Element? parentElement;
|
||||
[Pure]
|
||||
boolean hasChildNodes();
|
||||
[Constant]
|
||||
[SameObject]
|
||||
readonly attribute NodeList childNodes;
|
||||
[Pure]
|
||||
readonly attribute Node? firstChild;
|
||||
|
@ -54,6 +55,7 @@ interface Node : EventTarget {
|
|||
void normalize();
|
||||
|
||||
Node cloneNode(optional boolean deep = false);
|
||||
[Pure]
|
||||
boolean isEqualNode(Node? node);
|
||||
|
||||
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
|
||||
|
@ -62,11 +64,16 @@ interface Node : EventTarget {
|
|||
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
|
||||
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
|
||||
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
|
||||
[Pure]
|
||||
unsigned short compareDocumentPosition(Node other);
|
||||
[Pure]
|
||||
boolean contains(Node? other);
|
||||
|
||||
[Pure]
|
||||
DOMString? lookupPrefix(DOMString? namespace);
|
||||
[Pure]
|
||||
DOMString? lookupNamespaceURI(DOMString? prefix);
|
||||
[Pure]
|
||||
boolean isDefaultNamespace(DOMString? namespace);
|
||||
|
||||
[Throws]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue