Skip to content

Commit 0e3f8c9

Browse files
committed
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.
1 parent c4bf37f commit 0e3f8c9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/cdp/domains/target.zig

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,11 @@ fn createTarget(cmd: anytype) !void {
178178
try doAttachtoTarget(cmd, target_id);
179179
}
180180

181-
try page.navigate(params.url, .{
182-
.reason = .address_bar,
183-
});
181+
if (!std.mem.eql(u8, "about:blank", params.url)) {
182+
try page.navigate(params.url, .{
183+
.reason = .address_bar,
184+
});
185+
}
184186

185187
try cmd.sendResult(.{
186188
.targetId = target_id,

0 commit comments

Comments
 (0)