Skip to main content

Module node

Module node 

Source
Expand description

Node operations: tree structure, tree mutation and text content.

Upstream: blitz-script/src/dom/node.rs. See MAPPING.md.

Modules§

document_position
The bit flags compare_document_position returns.

Functions§

append_child
parent.appendChild(child), returning the child.
child_nodes
node.childNodes, as a snapshot rather than a live list.
clone_node
node.cloneNode(deep).
compare_document_position
node.compareDocumentPosition(other).
contains
node.contains(other).
first_child
node.firstChild.
has_child_nodes
node.hasChildNodes().
insert_before
parent.insertBefore(new_node, reference), returning the inserted node.
next_sibling
node.nextSibling.
parent_node
node.parentNode (and parentElement, which upstream aliases to it).
previous_sibling
node.previousSibling.
remove_child
parent.removeChild(child), returning the child.
replace_child
parent.replaceChild(new_node, old_node), returning the replaced node.
set_text_content
node.textContent = text.
text_content
node.textContent, concatenated over the subtree.
text_content_into
node.textContent, written into a caller-supplied buffer.
text_content_len
The byte length of node.textContent, without building it.