Skip to content

Commit 4f99407

Browse files
Merge pull request #288 from lightpanda-io/cdp-create-target
cdp: browserContextId is optional in Target.createTarget
2 parents 38813a2 + 8ba911c commit 4f99407

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cdp/target.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ fn createTarget(
319319
url: []const u8,
320320
width: ?u64 = null,
321321
height: ?u64 = null,
322-
browserContextId: []const u8,
322+
browserContextId: ?[]const u8 = null,
323323
enableBeginFrameControl: bool = false,
324324
newWindow: bool = false,
325325
background: bool = false,
@@ -342,7 +342,7 @@ fn createTarget(
342342
.targetId = ctx.state.frameID,
343343
.title = "",
344344
.url = ctx.state.url,
345-
.browserContextId = ContextID,
345+
.browserContextId = msg.params.?.browserContextId orelse ContextID,
346346
},
347347
.waitingForDebugger = true,
348348
};

0 commit comments

Comments
 (0)