Add prepend, append and relpaceChildren to DocumentFragment

This commit is contained in:
Karl Seguin
2025-05-12 09:35:33 +08:00
parent b5eea2136b
commit b8cdc0f145

View File

@@ -43,6 +43,18 @@ pub const DocumentFragment = struct {
_ = self; _ = self;
return true; return true;
} }
pub fn _prepend(self: *parser.DocumentFragment, nodes: []const Node.NodeOrText) !void {
return Node.prepend(parser.documentFragmentToNode(self), nodes);
}
pub fn _append(self: *parser.DocumentFragment, nodes: []const Node.NodeOrText) !void {
return Node.append(parser.documentFragmentToNode(self), nodes);
}
pub fn _replaceChildren(self: *parser.DocumentFragment, nodes: []const Node.NodeOrText) !void {
return Node.replaceChildren(parser.documentFragmentToNode(self), nodes);
}
}; };
const testing = @import("../../testing.zig"); const testing = @import("../../testing.zig");