cdp: don't navigate for about:blank

If the create target url is `about:blank`, don't navigate.
Indeed, Chrome doesn't navigate if the url is blank.
This commit is contained in:
Pierre Tachoire
2025-11-18 18:09:49 +01:00
parent c4bf37fb5b
commit 0e3f8c9e42

View File

@@ -178,9 +178,11 @@ fn createTarget(cmd: anytype) !void {
try doAttachtoTarget(cmd, target_id);
}
try page.navigate(params.url, .{
.reason = .address_bar,
});
if (!std.mem.eql(u8, "about:blank", params.url)) {
try page.navigate(params.url, .{
.reason = .address_bar,
});
}
try cmd.sendResult(.{
.targetId = target_id,