[csswg-drafts] Pull Request: [css-view-transitions-1] Defer restoring persisted state until after capturing old state

noamr has just submitted a new pull request for https://github.com/w3c/csswg-drafts:

== [css-view-transitions-1] Defer restoring persisted state until after capturing old state ==
This fixes an issue that the spec restores the persisted state (e.g. scroll position) too eagerly, e.g. when calling `document.startViewTransition` inside a `popstate` handler, not giving the UA an opportunity to first capture the old state.

This exports an algorithm that should be called from the HTML spec when ready to automatically restore persisted state, e.g. after `popstate`. If the algorithm returns true, proceed as normal, otherwise the state will be restored after capturing the old state.

See https://github.com/w3c/csswg-drafts/pull/9676


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 4 December 2023 20:49:32 UTC