Contextual frameTree

Signed-off-by: Francis Bouvier <francis@lightpanda.io>
This commit is contained in:
Francis Bouvier
2024-04-18 20:54:30 +02:00
parent 508741c367
commit fc1b3d5397
4 changed files with 42 additions and 14 deletions

View File

@@ -178,13 +178,20 @@ fn createTarget(
_ = try getParams(alloc, Params, scanner);
const sessionID = try cdp.getSessionID(scanner);
// change CDP state
ctx.state.frameID = TargetID;
ctx.state.url = "about:blank";
ctx.state.securityOrigin = "://";
ctx.state.secureContextType = "InsecureScheme";
ctx.state.loaderID = "DD4A76F842AA389647D702B4D805F49A";
// send attachToTarget event
const attached = AttachToTarget{
.sessionId = ContextSessionID,
.targetInfo = .{
.targetId = TargetID,
.targetId = ctx.state.frameID,
.title = "",
.url = "about:blank",
.url = ctx.state.url,
.browserContextId = ContextID,
},
.waitingForDebugger = true,