mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-12-14 15:28:57 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user