Remove BrowserContext URL

Add BrowserContext.getURL which gets the URL from the session.page.
This commit is contained in:
Karl Seguin
2025-04-07 13:51:50 +08:00
parent b76875bf5d
commit f38a0d2d67
4 changed files with 13 additions and 12 deletions

View File

@@ -132,7 +132,6 @@ fn createTarget(cmd: anytype) !void {
_ = try bc.session.createPage(aux_data);
// change CDP state
bc.url = "about:blank";
bc.security_origin = "://";
bc.secure_context_type = "InsecureScheme";
bc.loader_id = LOADER_ID;
@@ -142,11 +141,11 @@ fn createTarget(cmd: anytype) !void {
// has been enabled?
try cmd.sendEvent("Target.targetCreated", .{
.targetInfo = TargetInfo{
.url = bc.url,
.attached = false,
.targetId = target_id,
.title = "about:blank",
.browserContextId = bc.id,
.attached = false,
.url = "about:blank",
},
}, .{});