LGTM1 On Wed, Mar 6, 2024 at 11:54 AM Noam Rosenthal <nrosent...@chromium.org> wrote:
> >>>> >>>> Summary >>>> >>>> The `pageswap` event is fired on a Document's window object when a >>>> navigation will replace this Document with a new Document. The event >>>> provides activation info about the navigation (type, NavigationHistoryEntry >>>> for the new Document). If the navigation has a cross-document >>>> ViewTransition, the event is dispatched before capturing state for the old >>>> Document. This allows the page-author to configure the old state captured >>>> for the transition based on the navigation's activation info and the >>>> current visual state of the old Document. This feature is split out from >>>> the larger ViewTransition-on-Navigation project. >>>> >>> >> Why is it split out? Is there some utility for this regardless of view >> transitions? >> > > Absolutely! For example it's a place where you can figure out that you're > navigating away to a different same-origin document (after redirects), and > act on it in some way, e.g. put something in `sessionStorage` like a video > playback position. > It's different from `pagehide` in that sense, because with `pagehide` you > don't know you're going to a new document. > > Also by having a generic event with an optional viewTransition property, > it can tell the author that a view transition *didn't* take place, which we > can't do with a view-transition event. > > The design for this (as for `pagerveal`) started from > view-transition-specific events and ended up gravitating towards this kind > of event with an optional attribute for this reason, and also to avoid a > situation where people create fake view transitions for the purpose of > getting these events. > Makes sense! > > >> >> >>> >>>> Blink componentBlink>ViewTransitions >>>> <https://bugs.chromium.org/p/chromium/issues/list?q=component:Blink%3EViewTransitions> >>>> >>>> TAG review >>>> https://github.com/w3ctag/design-reviews/issues/851#issuecomment-1924730258 >>>> >>>> TAG review statusPending >>>> >>>> Risks >>>> >>>> Interoperability and Compatibility >>>> >>>> None >>>> >>>> *Gecko*: Positive ( >>>> https://github.com/mozilla/standards-positions/issues/969) >>>> >>> >> Is that the right position? >> > > Yes, the name was changed while iterating, but it's the same feature and > Gecko folks took active part in the design and reviews. > Ooh, got it! -- 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+unsubscr...@chromium.org. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOmohSKjwe8bHquJ09vUW%2BeSvXr3tuBASCOKh1SAk7ay4Fay4Q%40mail.gmail.com.