Rename page.id to page._frame_id

This field was recently added and is used to generate correct frameIds in CDP
messages. They remain the same during a navigation event, so calling them
page.id might cause surprises since navigation events create new pages, but
retain the original id. Hence, frame_id is more accurate and hopefully less
surprising.

(This is a small cleanup prior to doing some iframe navigation work).
This commit is contained in:
Karl Seguin
2026-03-02 16:21:29 +08:00
parent 552831364d
commit 10ad5d763e
11 changed files with 70 additions and 70 deletions

View File

@@ -320,7 +320,7 @@ fn fetchRobotsThenProcessRequest(self: *Client, robots_url: [:0]const u8, req: R
.method = .GET,
.headers = headers,
.blocking = false,
.page_id = req.page_id,
.frame_id = req.frame_id,
.cookie_jar = req.cookie_jar,
.notification = req.notification,
.resource_type = .fetch,
@@ -855,7 +855,7 @@ pub const RequestCookie = struct {
};
pub const Request = struct {
page_id: u32,
frame_id: u32,
method: Method,
url: [:0]const u8,
headers: Net.Headers,