Node
Generated from idl/dom.webidl when the site was built at 7aa23e2.
Node is an interface in idl/dom.webidl, inheriting EventTarget, exposed in Window. What it does is on MDN; this page says what niso has of it.
Status
Section titled “Status”The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).
| Feature | On the web | In niso | Members |
|---|---|---|---|
| DOM | Widely available | No WPT tests WPT maps no test to it | 28 |
| Shadow DOM | Widely available | Partial 3.4% 26 of 756 subtests pass | 2 |
Members
Section titled “Members”xmlSerialization()
Section titled “xmlSerialization()”[NisoNative] DOMString xmlSerialization(boolean requireWellFormed);int32_t niso_node_xml_serialization(niso_dom* dom, niso_handle self, bool require_well_formed, niso_str* out);The node’s XML serialization (DOM Parsing’s “produce an XML serialization”); an InvalidStateError if requireWellFormed is true and the result wouldn’t be well-formed XML.
ELEMENT_NODE
Section titled “ELEMENT_NODE”const unsigned short ELEMENT_NODE = 1;ATTRIBUTE_NODE
Section titled “ATTRIBUTE_NODE”const unsigned short ATTRIBUTE_NODE = 2;TEXT_NODE
Section titled “TEXT_NODE”const unsigned short TEXT_NODE = 3;CDATA_SECTION_NODE
Section titled “CDATA_SECTION_NODE”const unsigned short CDATA_SECTION_NODE = 4;ENTITY_REFERENCE_NODE
Section titled “ENTITY_REFERENCE_NODE”const unsigned short ENTITY_REFERENCE_NODE = 5;ENTITY_NODE
Section titled “ENTITY_NODE”const unsigned short ENTITY_NODE = 6;PROCESSING_INSTRUCTION_NODE
Section titled “PROCESSING_INSTRUCTION_NODE”const unsigned short PROCESSING_INSTRUCTION_NODE = 7;COMMENT_NODE
Section titled “COMMENT_NODE”const unsigned short COMMENT_NODE = 8;DOCUMENT_NODE
Section titled “DOCUMENT_NODE”const unsigned short DOCUMENT_NODE = 9;DOCUMENT_TYPE_NODE
Section titled “DOCUMENT_TYPE_NODE”const unsigned short DOCUMENT_TYPE_NODE = 10;DOCUMENT_FRAGMENT_NODE
Section titled “DOCUMENT_FRAGMENT_NODE”const unsigned short DOCUMENT_FRAGMENT_NODE = 11;NOTATION_NODE
Section titled “NOTATION_NODE”const unsigned short NOTATION_NODE = 12;nodeType
Section titled “nodeType”readonly attribute unsigned short nodeType;int32_t niso_node_get_node_type(niso_dom* dom, niso_handle self, uint16_t* out);nodeName
Section titled “nodeName”readonly attribute DOMString nodeName;int32_t niso_node_get_node_name(niso_dom* dom, niso_handle self, niso_str* out);baseURI
Section titled “baseURI”readonly attribute USVString baseURI;int32_t niso_node_get_base_uri(niso_dom* dom, niso_handle self, niso_str* out);isConnected
Section titled “isConnected”readonly attribute boolean isConnected;int32_t niso_node_get_is_connected(niso_dom* dom, niso_handle self, bool* out);ownerDocument
Section titled “ownerDocument”readonly attribute Document? ownerDocument;int32_t niso_node_get_owner_document(niso_dom* dom, niso_handle self, niso_handle* out);getRootNode()
Section titled “getRootNode()”Node getRootNode();int32_t niso_node_get_root_node(niso_dom* dom, niso_handle self, niso_handle* out);parentNode
Section titled “parentNode”readonly attribute Node? parentNode;int32_t niso_node_get_parent_node(niso_dom* dom, niso_handle self, niso_handle* out);parentElement
Section titled “parentElement”readonly attribute Element? parentElement;int32_t niso_node_get_parent_element(niso_dom* dom, niso_handle self, niso_handle* out);hasChildNodes()
Section titled “hasChildNodes()”boolean hasChildNodes();int32_t niso_node_has_child_nodes(niso_dom* dom, niso_handle self, bool* out);childNodes
Section titled “childNodes”readonly attribute NodeList childNodes;int32_t niso_node_get_child_nodes(niso_dom* dom, niso_handle self, niso_handles* out);firstChild
Section titled “firstChild”readonly attribute Node? firstChild;int32_t niso_node_get_first_child(niso_dom* dom, niso_handle self, niso_handle* out);lastChild
Section titled “lastChild”readonly attribute Node? lastChild;int32_t niso_node_get_last_child(niso_dom* dom, niso_handle self, niso_handle* out);previousSibling
Section titled “previousSibling”readonly attribute Node? previousSibling;int32_t niso_node_get_previous_sibling(niso_dom* dom, niso_handle self, niso_handle* out);nextSibling
Section titled “nextSibling”readonly attribute Node? nextSibling;int32_t niso_node_get_next_sibling(niso_dom* dom, niso_handle self, niso_handle* out);nodeValue
Section titled “nodeValue”attribute DOMString? nodeValue;int32_t niso_node_get_node_value(niso_dom* dom, niso_handle self, niso_str* out);int32_t niso_node_set_node_value(niso_dom* dom, niso_handle self, const char* value, size_t value_len);textContent
Section titled “textContent”attribute DOMString? textContent;int32_t niso_node_get_text_content(niso_dom* dom, niso_handle self, niso_str* out);int32_t niso_node_set_text_content(niso_dom* dom, niso_handle self, const char* value, size_t value_len);normalize()
Section titled “normalize()”undefined normalize();int32_t niso_node_normalize(niso_dom* dom, niso_handle self);cloneNode()
Section titled “cloneNode()”Node cloneNode(optional boolean subtree = false);int32_t niso_node_clone_node(niso_dom* dom, niso_handle self, bool subtree, niso_handle* out);isEqualNode()
Section titled “isEqualNode()”boolean isEqualNode(Node? otherNode);int32_t niso_node_is_equal_node(niso_dom* dom, niso_handle self, niso_handle other_node, bool* out);isSameNode()
Section titled “isSameNode()”boolean isSameNode(Node? otherNode);int32_t niso_node_is_same_node(niso_dom* dom, niso_handle self, niso_handle other_node, bool* out);DOCUMENT_POSITION_DISCONNECTED
Section titled “DOCUMENT_POSITION_DISCONNECTED”const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;DOCUMENT_POSITION_PRECEDING
Section titled “DOCUMENT_POSITION_PRECEDING”const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;DOCUMENT_POSITION_FOLLOWING
Section titled “DOCUMENT_POSITION_FOLLOWING”const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;DOCUMENT_POSITION_CONTAINS
Section titled “DOCUMENT_POSITION_CONTAINS”const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;DOCUMENT_POSITION_CONTAINED_BY
Section titled “DOCUMENT_POSITION_CONTAINED_BY”const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
Section titled “DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC”const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;compareDocumentPosition()
Section titled “compareDocumentPosition()”unsigned short compareDocumentPosition(Node other);int32_t niso_node_compare_document_position(niso_dom* dom, niso_handle self, niso_handle other, uint16_t* out);contains()
Section titled “contains()”boolean contains(Node? other);int32_t niso_node_contains(niso_dom* dom, niso_handle self, niso_handle other, bool* out);lookupPrefix()
Section titled “lookupPrefix()”DOMString? lookupPrefix(DOMString? namespace);int32_t niso_node_lookup_prefix(niso_dom* dom, niso_handle self, const char* namespace_, size_t namespace__len, niso_str* out);lookupNamespaceURI()
Section titled “lookupNamespaceURI()”DOMString? lookupNamespaceURI(DOMString? prefix);int32_t niso_node_lookup_namespace_uri(niso_dom* dom, niso_handle self, const char* prefix, size_t prefix_len, niso_str* out);isDefaultNamespace()
Section titled “isDefaultNamespace()”boolean isDefaultNamespace(DOMString? namespace);int32_t niso_node_is_default_namespace(niso_dom* dom, niso_handle self, const char* namespace_, size_t namespace__len, bool* out);insertBefore()
Section titled “insertBefore()”Node insertBefore(Node node, Node? child);int32_t niso_node_insert_before(niso_dom* dom, niso_handle self, niso_handle node, niso_handle child, niso_handle* out);appendChild()
Section titled “appendChild()”Node appendChild(Node node);int32_t niso_node_append_child(niso_dom* dom, niso_handle self, niso_handle node, niso_handle* out);replaceChild()
Section titled “replaceChild()”Node replaceChild(Node node, Node child);int32_t niso_node_replace_child(niso_dom* dom, niso_handle self, niso_handle node, niso_handle child, niso_handle* out);removeChild()
Section titled “removeChild()”Node removeChild(Node child);int32_t niso_node_remove_child(niso_dom* dom, niso_handle self, niso_handle child, niso_handle* out);Not in niso yet
Section titled “Not in niso yet”Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.
selectstart event(Selection)