finalize document loading with non-HTML pages

Avoid infinite the loop of loading non-HTML documents with CDP.
This commit is contained in:
Pierre Tachoire
2025-08-12 12:55:44 +02:00
parent ea0bbaf332
commit 971524fa3b

View File

@@ -608,7 +608,10 @@ pub const Page = struct {
self.clearTransferArena(); self.clearTransferArena();
switch (self.mode) { switch (self.mode) {
.raw => |buf| self.mode = .{ .raw_done = buf.items }, .raw => |buf| {
self.mode = .{ .raw_done = buf.items };
self.documentIsComplete();
},
.html => |*p| { .html => |*p| {
const html_doc = p.html_doc; const html_doc = p.html_doc;
p.deinit(); // don't need the parser anymore p.deinit(); // don't need the parser anymore