make ref_node of nodeInsertBefore nullable

This commit is contained in:
nikneym
2025-09-24 20:21:48 +03:00
parent 255b45d07b
commit 923491a510

View File

@@ -1363,7 +1363,7 @@ pub fn nodeHasChildNodes(node: *Node) bool {
return res;
}
pub fn nodeInsertBefore(node: *Node, new_node: *Node, ref_node: *Node) !*Node {
pub fn nodeInsertBefore(node: *Node, new_node: *Node, ref_node: ?*Node) !*Node {
var res: ?*Node = null;
const err = nodeVtable(node).dom_node_insert_before.?(node, new_node, ref_node, &res);
try DOMErr(err);