mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 15:13:28 +00:00
Remove BrowserContext URL
Add BrowserContext.getURL which gets the URL from the session.page.
This commit is contained in:
@@ -61,10 +61,10 @@ fn getFrameTree(cmd: anytype) !void {
|
||||
return cmd.sendResult(.{
|
||||
.frameTree = .{
|
||||
.frame = Frame{
|
||||
.url = bc.url,
|
||||
.id = target_id,
|
||||
.loaderId = bc.loader_id,
|
||||
.securityOrigin = bc.security_origin,
|
||||
.url = bc.getURL() orelse "about:blank",
|
||||
.secureContextType = bc.secure_context_type,
|
||||
},
|
||||
},
|
||||
@@ -154,7 +154,6 @@ pub fn navigateToUrl(cmd: anytype, url: []const u8, send_result: bool) !void {
|
||||
|
||||
// change state
|
||||
bc.reset();
|
||||
bc.url = url;
|
||||
bc.loader_id = cmd.cdp.loader_id_gen.next();
|
||||
|
||||
const LifecycleEvent = struct {
|
||||
@@ -285,7 +284,7 @@ test "cdp.page: getFrameTree" {
|
||||
.frame = .{
|
||||
.id = "TID-3",
|
||||
.loaderId = bc.loader_id,
|
||||
.url = bc.url,
|
||||
.url = "about:blank",
|
||||
.domainAndRegistry = "",
|
||||
.securityOrigin = bc.security_origin,
|
||||
.mimeType = "text/html",
|
||||
|
||||
Reference in New Issue
Block a user