2022-02-15 22:40:51 +03:30
|
|
|
#import <DOM/Document.idl>
|
|
|
|
#import <DOM/Element.idl>
|
|
|
|
#import <DOM/EventTarget.idl>
|
|
|
|
|
2020-06-20 22:09:38 +02:00
|
|
|
interface Node : EventTarget {
|
|
|
|
|
2021-03-06 17:06:25 +00:00
|
|
|
readonly attribute unsigned short nodeType;
|
2020-06-20 22:09:38 +02:00
|
|
|
readonly attribute DOMString nodeName;
|
2021-03-06 17:06:25 +00:00
|
|
|
|
2022-04-12 13:20:13 -03:00
|
|
|
readonly attribute USVString baseURI;
|
|
|
|
|
2021-03-06 17:06:25 +00:00
|
|
|
boolean hasChildNodes();
|
2021-10-02 20:37:45 +01:00
|
|
|
[SameObject] readonly attribute NodeList childNodes;
|
2020-06-20 22:09:38 +02:00
|
|
|
readonly attribute Node? firstChild;
|
|
|
|
readonly attribute Node? lastChild;
|
|
|
|
readonly attribute Node? previousSibling;
|
|
|
|
readonly attribute Node? nextSibling;
|
2020-06-20 22:26:54 +02:00
|
|
|
readonly attribute Node? parentNode;
|
|
|
|
readonly attribute Element? parentElement;
|
2021-04-10 10:34:58 -07:00
|
|
|
readonly attribute boolean isConnected;
|
2021-05-02 21:03:50 +01:00
|
|
|
readonly attribute Document? ownerDocument;
|
2021-10-16 03:04:55 +01:00
|
|
|
Node getRootNode(optional GetRootNodeOptions options = {});
|
2021-09-06 00:21:59 +01:00
|
|
|
|
2022-02-18 22:11:43 +00:00
|
|
|
[CEReactions] attribute DOMString? nodeValue;
|
2021-09-06 00:21:59 +01:00
|
|
|
// FIXME: [LegacyNullToEmptyString] is not allowed on nullable types as per the Web IDL spec.
|
|
|
|
// However, we only apply it to setters, so this works as a stop gap.
|
|
|
|
// Replace this with something like a special cased [LegacyNullToEmptyString].
|
|
|
|
[LegacyNullToEmptyString] attribute DOMString? textContent;
|
2020-06-20 22:09:38 +02:00
|
|
|
|
2020-06-21 01:00:58 +02:00
|
|
|
Node appendChild(Node node);
|
2021-04-06 19:34:49 +01:00
|
|
|
[ImplementedAs=pre_insert] Node insertBefore(Node node, Node? child);
|
2021-05-07 00:52:23 +01:00
|
|
|
Node replaceChild(Node node, Node child);
|
2021-04-06 19:34:49 +01:00
|
|
|
[ImplementedAs=pre_remove] Node removeChild(Node child);
|
2021-04-14 01:25:10 +02:00
|
|
|
[ImplementedAs=clone_node_binding] Node cloneNode(optional boolean deep = false);
|
2021-07-05 05:55:02 +01:00
|
|
|
boolean contains(Node? other);
|
2021-09-13 12:54:24 +02:00
|
|
|
boolean isEqualNode(Node? otherNode);
|
2021-09-13 12:49:23 +02:00
|
|
|
boolean isSameNode(Node? otherNode);
|
2020-06-20 22:09:38 +02:00
|
|
|
|
2021-03-06 17:06:25 +00:00
|
|
|
const unsigned short ELEMENT_NODE = 1;
|
|
|
|
const unsigned short ATTRIBUTE_NODE = 2;
|
|
|
|
const unsigned short TEXT_NODE = 3;
|
|
|
|
const unsigned short CDATA_SECTION_NODE = 4;
|
|
|
|
const unsigned short ENTITY_REFERENCE_NODE = 5;
|
|
|
|
const unsigned short ENTITY_NODE = 6;
|
|
|
|
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
|
|
|
|
const unsigned short COMMENT_NODE = 8;
|
|
|
|
const unsigned short DOCUMENT_NODE = 9;
|
|
|
|
const unsigned short DOCUMENT_TYPE_NODE = 10;
|
|
|
|
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
|
|
|
|
const unsigned short NOTATION_NODE = 12;
|
|
|
|
|
2021-04-10 17:21:22 -07:00
|
|
|
unsigned short compareDocumentPosition(Node? otherNode);
|
|
|
|
// Node.compareDocumentPosition() constants
|
|
|
|
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 1;
|
|
|
|
const unsigned short DOCUMENT_POSITION_PRECEDING = 2;
|
|
|
|
const unsigned short DOCUMENT_POSITION_FOLLOWING = 4;
|
|
|
|
const unsigned short DOCUMENT_POSITION_CONTAINS = 8;
|
|
|
|
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 16;
|
|
|
|
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
|
2021-03-06 17:06:25 +00:00
|
|
|
};
|
2021-10-16 03:04:55 +01:00
|
|
|
|
|
|
|
dictionary GetRootNodeOptions {
|
|
|
|
boolean composed = false;
|
|
|
|
};
|