No need to navigate to about:blank

This commit is contained in:
sjorsdonkers
2025-05-20 12:39:46 +02:00
committed by Sjors
parent 967ab18d53
commit 3f31573bcb
3 changed files with 4 additions and 11 deletions

View File

@@ -207,7 +207,7 @@ pub const Random = struct {
};
pub const Document = struct {
doc: *parser.Document,
doc: *parser.DocumentHTML,
arena: std.heap.ArenaAllocator,
pub fn init(html: []const u8) !Document {
@@ -219,7 +219,7 @@ pub const Document = struct {
return .{
.arena = std.heap.ArenaAllocator.init(allocator),
.doc = parser.documentHTMLToDocument(html_doc),
.doc = html_doc,
};
}
@@ -240,7 +240,7 @@ pub const Document = struct {
}
pub fn asNode(self: *const Document) *parser.Node {
return parser.documentToNode(self.doc);
return parser.documentHTMLToNode(self.doc);
}
};