mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
node: add replaceChild method
Signed-off-by: Francis Bouvier <francis.bouvier@gmail.com>
This commit is contained in:
@@ -383,6 +383,12 @@ pub fn nodeRemoveChild(node: *Node, child: *Node) *Node {
|
||||
return res.?;
|
||||
}
|
||||
|
||||
pub fn nodeReplaceChild(node: *Node, new_child: *Node, old_child: *Node) *Node {
|
||||
var res: ?*Node = undefined;
|
||||
_ = nodeVtable(node).dom_node_replace_child.?(node, new_child, old_child, &res);
|
||||
return res.?;
|
||||
}
|
||||
|
||||
// CharacterData
|
||||
pub const CharacterData = c.dom_characterdata;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user