Implement Page.lifecycleEvent
Categories
(Remote Protocol :: CDP, task, P1)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: whimboo, Assigned: whimboo)
References
(Blocks 4 open bugs, )
Details
(Whiteboard: [puppeteer-alpha])
Attachments
(2 files)
As David mentioned to me this event seems to block our testing capabilities for Gutenberg tests, and that I should have a look at it. I will have a look first how Chrome's behavior is, and then get it implemented for the remote agent.
Assignee | ||
Comment 1•5 years ago
|
||
This test indicates that those event's aren't only fired for Page
related events but also for other domains like Network, which in this case is for networkIdle
events.
Otherwise it needs to be fired for each top-level page lifecycle event like navigation, load, paint, etc... A list of important events where this event needs to be emited. Those events are:
[0] : DOMContentLoaded
[1] : firstContentfulPaint
[2] : firstMeaningfulPaint
[3] : firstMeaningfulPaintCandidate
[4] : firstPaint
[5] : init
[6] : load
[7] : networkAlmostIdle
[8] : networkIdle
With the patch on this bug I will get this implemented for any event we currently support. For others a follow-up bug needs to be filed.
Assignee | ||
Comment 2•5 years ago
|
||
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from comment #1)
[1] : firstContentfulPaint [2] : firstMeaningfulPaint [3] : firstMeaningfulPaintCandidate [4] : firstPaint
These events are all performance related. And none of them are blocking the Gutenberg test suite.
[7] : networkAlmostIdle [8] : networkIdle
Both are related to the Network
domain which we haven't implemented yet beside some individual methods and events. So they will have to be done at a later time.
[0] : DOMContentLoaded [5] : init [6] : load
Those are the additions which I will cover on this bug.
Assignee | ||
Comment 3•5 years ago
|
||
Looking at logs from a simple Puppeteer script, I also see a commit
lifecycle event after {"method":"Target.createTarget","params":{"url":"about:blank"},"id":2}
and Page.enable
.
commit
precedes DOMContentLoaded. Is it a Blinkism?
See:
Here's a log in case it's useful. You can test your patch with this example, as well.
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D53826
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
(In reply to Maja Frydrychowicz :maja_zf (UTC-4) (maja@mozilla.com) from comment #4)
Looking at logs from a simple Puppeteer script, I also see a
commit
lifecycle event after{"method":"Target.createTarget","params":{"url":"about:blank"},"id":2}
andPage.enable
.
commit
precedes DOMContentLoaded. Is it a Blinkism?
As it looks like the commit
lifecycle event is only emitted when Page.setLifecycleEventsEnabled
is set to true. As it would be a commit for that change, and all the navigation lifecycle events will follow. As discussed with Maja we can follow-up on that, and she filed bug 1597762.
Comment 9•5 years ago
|
||
bugherder |
Updated•4 years ago
|
Description
•