Merge pull request #1682 from lightpanda-io/iframe_document_open_fix

Noop when document.open is called during iframe parsing
This commit is contained in:
Pierre Tachoire
2026-03-01 10:57:42 +01:00
committed by GitHub

View File

@@ -653,12 +653,14 @@ pub fn write(self: *Document, text: []const []const u8, page: *Page) !void {
}
if (html.len > 0) {
self._script_created_parser.?.read(html) catch |err| {
if (self._script_created_parser) |*parser| {
parser.read(html) catch |err| {
log.warn(.dom, "document.write parser error", .{ .err = err });
// was alrady closed
self._script_created_parser = null;
};
}
}
return;
}