The `firstrender` event is fired on a Document's window object at the first render opportunity after a Document is: initially loaded, restored from the back-forward cache, activated from a prerender. It can be used by a page author to setup a page entry UX - such as a ViewTransition from a previous state. This feature is split out from the larger ViewTransition-on-Navigation project.
This event enables authors to make last-minute DOM changes once a document is ready to be presented but before it is rendered. In particular, this enables an author to setup their style for a ViewTransition, if one is available, from a single convenient place. Without it, authors would have to do this from a `requestAnimationFrame` and also remember to add listen to `pageshow.persisted` to handle the BFCache case, which is error prone. This event is also how a cross-document ViewTransition object is passed into the incoming Document.
None
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
None
No milestones specified
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f0f76584-ea3f-43ab-946c-b920fc064344n%40chromium.org.
On Sep 28, 2023, at 16:27, Yoav Weiss <yoav...@chromium.org> wrote:
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfUbusD0Y5XD2QzMnN_80UsLbtpgex%3D_p2EJmMC8CmbTnA%40mail.gmail.com.
This is exciting!! (also as a scheduling primitive - e.g. as a way to start loading or executing certain scripts only after the first render)Are you planning to have the event first more or less at a similar time to when first paint is reported? I'm guessing that we want that event to run after rendering is kicked off (rather than have it delay the first render).
This looks useful.Likely a quick review (I don't see why it would be contentious) so maybe not a big deal, but any reason why there is no TAG review?
On Thu, Sep 28, 2023 at 3:06 PM Sangwhan Moon <s...@chromium.org> wrote:This looks useful.Likely a quick review (I don't see why it would be contentious) so maybe not a big deal, but any reason why there is no TAG review?It was TAG-reviewed as part of CSS view transitions:
This is exciting!! (also as a scheduling primitive - e.g. as a way to start loading or executing certain scripts only after the first render)
Are you planning to have the event first more or less at a similar time to when first paint is reported? I'm guessing that we want that event to run after rendering is kicked off (rather than have it delay the first render).