Closed Bug 1543095 Opened 4 years ago Closed 4 years ago

Emit Page.frameNavigated event


(Remote Protocol :: CDP, enhancement, P1)



(Not tracked)



(Reporter: ochameau, Assigned: ochameau)


(Blocks 3 open bugs)



(2 files)

The documentation of this event is sparse:
Fired once navigation of the frame has completed. Frame is now associated with the new loader.

Chromium implementation:

But from what I can see when running Wordpress test suite, this event seems to be sent earlier than what the documentation suggests.

And by looking at Puppeteer usage of it:
You can see that it has to fire the earliest, so that the Frame instance created on line 232 is registered in the global Map on line 234.

So that later, we have the Frame instance for the given frameId available when we receive all the other events.
For example here, on lify cycle events:

I would say that Page.frameNavigated has to be fired the earliest it can, as soon as we can compute the frameId of a frame. The location will most likely be invalid and still refer to the previous origin, but I imagine some other event is going to update the location. Like Frame.navigatedWithinDocument.

Type: defect → enhancement
Blocks: 1543098
Priority: -- → P2
Attachment #9058289 - Attachment description: Bug 1543095 - Implement Page.frameNavigated → Bug 1543095 - Implement Page.frameNavigated.
Pushed by
Implement Page.frameNavigated. r=ato
Pass `frameId` to all Page events. r=ato
Blocks: 1548102
Closed: 4 years ago
Resolution: --- → FIXED
Priority: P2 → P1
Component: CDP: Page → CDP
You need to log in before you can comment on or make changes to this bug.