mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
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:
@@ -193,7 +193,7 @@ pub fn requestIntercept(bc: anytype, intercept: *const Notification.RequestInter
|
||||
|
||||
try bc.cdp.sendEvent("Fetch.requestPaused", .{
|
||||
.requestId = &id.toInterceptId(transfer.id),
|
||||
.frameId = &id.toFrameId(transfer.req.page_id),
|
||||
.frameId = &id.toFrameId(transfer.req.frame_id),
|
||||
.request = network.TransferAsRequestWriter.init(transfer),
|
||||
.resourceType = switch (transfer.req.resource_type) {
|
||||
.script => "Script",
|
||||
@@ -397,7 +397,7 @@ pub fn requestAuthRequired(bc: anytype, intercept: *const Notification.RequestAu
|
||||
|
||||
try bc.cdp.sendEvent("Fetch.authRequired", .{
|
||||
.requestId = &id.toInterceptId(transfer.id),
|
||||
.frameId = &id.toFrameId(transfer.req.page_id),
|
||||
.frameId = &id.toFrameId(transfer.req.frame_id),
|
||||
.request = network.TransferAsRequestWriter.init(transfer),
|
||||
.resourceType = switch (transfer.req.resource_type) {
|
||||
.script => "Script",
|
||||
|
||||
Reference in New Issue
Block a user