Annotate many DOM attribute and methods with [Constant] and [Pure]

This commit is contained in:
Anthony Ramine 2015-09-11 02:51:51 +02:00
parent 4dbf391e83
commit 49219baab8
18 changed files with 69 additions and 14 deletions

View file

@ -34,6 +34,7 @@ interface Node : EventTarget {
readonly attribute Node? parentNode;
[Pure]
readonly attribute Element? parentElement;
[Pure]
boolean hasChildNodes();
[SameObject]
readonly attribute NodeList childNodes;
@ -53,6 +54,7 @@ interface Node : EventTarget {
void normalize();
Node cloneNode(optional boolean deep = false);
[Pure]
boolean isEqualNode(Node? node);
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
@ -61,11 +63,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]