Skip to content

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.

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
operation native code only
[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.

const
const unsigned short ELEMENT_NODE = 1;
const
const unsigned short ATTRIBUTE_NODE = 2;
const
const unsigned short TEXT_NODE = 3;
const
const unsigned short CDATA_SECTION_NODE = 4;
const
const unsigned short ENTITY_REFERENCE_NODE = 5;
const
const unsigned short ENTITY_NODE = 6;
const
const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
const
const unsigned short COMMENT_NODE = 8;
const
const unsigned short DOCUMENT_NODE = 9;
const
const unsigned short DOCUMENT_TYPE_NODE = 10;
const
const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
const
const unsigned short NOTATION_NODE = 12;
attribute
readonly attribute unsigned short nodeType;
int32_t niso_node_get_node_type(niso_dom* dom, niso_handle self, uint16_t* out);
attribute
readonly attribute DOMString nodeName;
int32_t niso_node_get_node_name(niso_dom* dom, niso_handle self, niso_str* out);
attribute
readonly attribute USVString baseURI;
int32_t niso_node_get_base_uri(niso_dom* dom, niso_handle self, niso_str* out);
attribute Shadow DOM: Partial 3.4%
readonly attribute boolean isConnected;
int32_t niso_node_get_is_connected(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute Document? ownerDocument;
int32_t niso_node_get_owner_document(niso_dom* dom, niso_handle self, niso_handle* out);
operation Shadow DOM: Partial 3.4%
Node getRootNode();
int32_t niso_node_get_root_node(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute Node? parentNode;
int32_t niso_node_get_parent_node(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute Element? parentElement;
int32_t niso_node_get_parent_element(niso_dom* dom, niso_handle self, niso_handle* out);
operation
boolean hasChildNodes();
int32_t niso_node_has_child_nodes(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute NodeList childNodes;
int32_t niso_node_get_child_nodes(niso_dom* dom, niso_handle self, niso_handles* out);
attribute
readonly attribute Node? firstChild;
int32_t niso_node_get_first_child(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute Node? lastChild;
int32_t niso_node_get_last_child(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute Node? previousSibling;
int32_t niso_node_get_previous_sibling(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
readonly attribute Node? nextSibling;
int32_t niso_node_get_next_sibling(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
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);
attribute
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);
operation
undefined normalize();
int32_t niso_node_normalize(niso_dom* dom, niso_handle self);
operation
Node cloneNode(optional boolean subtree = false);
int32_t niso_node_clone_node(niso_dom* dom, niso_handle self, bool subtree, niso_handle* out);
operation
boolean isEqualNode(Node? otherNode);
int32_t niso_node_is_equal_node(niso_dom* dom, niso_handle self, niso_handle other_node, bool* out);
operation
boolean isSameNode(Node? otherNode);
int32_t niso_node_is_same_node(niso_dom* dom, niso_handle self, niso_handle other_node, bool* out);
const
const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
const
const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
const
const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
const
const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
const
const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
const
const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
operation
unsigned short compareDocumentPosition(Node other);
int32_t niso_node_compare_document_position(niso_dom* dom, niso_handle self, niso_handle other, uint16_t* out);
operation
boolean contains(Node? other);
int32_t niso_node_contains(niso_dom* dom, niso_handle self, niso_handle other, bool* out);
operation
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);
operation
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);
operation
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);
operation
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);
operation
Node appendChild(Node node);
int32_t niso_node_append_child(niso_dom* dom, niso_handle self, niso_handle node, niso_handle* out);
operation
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);
operation
Node removeChild(Node child);
int32_t niso_node_remove_child(niso_dom* dom, niso_handle self, niso_handle child, niso_handle* out);

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)