Merge pull request #288 from lightpanda-io/cdp-create-target

cdp: browserContextId is optional in Target.createTarget
This commit is contained in:
Francis Bouvier
2024-11-15 00:53:22 +01:00
committed by GitHub

View File

@@ -319,7 +319,7 @@ fn createTarget(
url: []const u8, url: []const u8,
width: ?u64 = null, width: ?u64 = null,
height: ?u64 = null, height: ?u64 = null,
browserContextId: []const u8, browserContextId: ?[]const u8 = null,
enableBeginFrameControl: bool = false, enableBeginFrameControl: bool = false,
newWindow: bool = false, newWindow: bool = false,
background: bool = false, background: bool = false,
@@ -342,7 +342,7 @@ fn createTarget(
.targetId = ctx.state.frameID, .targetId = ctx.state.frameID,
.title = "", .title = "",
.url = ctx.state.url, .url = ctx.state.url,
.browserContextId = ContextID, .browserContextId = msg.params.?.browserContextId orelse ContextID,
}, },
.waitingForDebugger = true, .waitingForDebugger = true,
}; };