MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / push_node

Method push_node

css-inline/src/html/document.rs:141–145  ·  view source on GitHub ↗

Add a new node to the nodes vector, returning its index.

(&mut self, node: NodeData)

Source from the content-addressed store, hash-verified

139
140 /// Add a new node to the nodes vector, returning its index.
141 pub(super) fn push_node(&mut self, node: NodeData) -> NodeId {
142 let next_index = self.nodes.len();
143 self.nodes.push(Node::new(node));
144 NodeId::new(next_index)
145 }
146
147 #[inline]
148 pub(super) fn push_element_id(&mut self, node: NodeId) {

Callers 2

test_insert_beforeFunction · 0.45
test_appendFunction · 0.45

Calls 1

pushMethod · 0.80

Tested by 2

test_insert_beforeFunction · 0.36
test_appendFunction · 0.36