From b3054d68bff34c51ba78ca2bc2c971b90958c37b Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Fri, 25 Oct 2024 15:51:18 +0200 Subject: [PATCH 1/2] cdp: browserContextId is optional in Target.createTarget https://chromedevtools.github.io/devtools-protocol/tot/Target/#method-createTarget --- src/cdp/target.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdp/target.zig b/src/cdp/target.zig index ba0e977c..81a53aa5 100644 --- a/src/cdp/target.zig +++ b/src/cdp/target.zig @@ -278,7 +278,7 @@ fn createTarget( url: []const u8, width: ?u64 = null, height: ?u64 = null, - browserContextId: []const u8, + browserContextId: ?[]const u8 = null, enableBeginFrameControl: bool = false, newWindow: bool = false, background: bool = false, From 8ba911c8dde89bcedd580ee098eaaa3881f110dd Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Tue, 12 Nov 2024 10:56:06 +0100 Subject: [PATCH 2/2] cdp: return provided browser context id if any --- src/cdp/target.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdp/target.zig b/src/cdp/target.zig index 81a53aa5..6cfb195e 100644 --- a/src/cdp/target.zig +++ b/src/cdp/target.zig @@ -301,7 +301,7 @@ fn createTarget( .targetId = ctx.state.frameID, .title = "", .url = ctx.state.url, - .browserContextId = ContextID, + .browserContextId = msg.params.?.browserContextId orelse ContextID, }, .waitingForDebugger = true, };