Append a node as the sibling immediately before the given node.
(&self, &sibling: &NodeId, child: NodeOrText<NodeId>)
| 288 | |
| 289 | /// Append a node as the sibling immediately before the given node. |
| 290 | fn append_before_sibling(&self, &sibling: &NodeId, child: NodeOrText<NodeId>) { |
| 291 | self.append_impl( |
| 292 | child, |
| 293 | |document| document[sibling].previous_sibling, |
| 294 | |document, node| document.insert_before(sibling, node), |
| 295 | ); |
| 296 | } |
| 297 | |
| 298 | /// Add each attribute to the given element, if no attribute with that name already exists. |
| 299 | fn add_attrs_if_missing(&self, &target: &NodeId, attrs: Vec<Attribute>) { |
no test coverage detected