Comments (7)
The flow goes like this:
- author calls
document.startViewTransition
- wait for next frame
- During frame rendering, set suppression to true (https://drafts.csswg.org/css-view-transitions-1/#setup-view-transition 3)
- Queue a task to call the author's update callback (https://drafts.csswg.org/css-view-transitions-1/#setup-view-transition 4.2)
- Once the update callback resolves, we activate the transition (https://drafts.csswg.org/css-view-transitions-1/#call-the-update-callback 6.1)
- Activating the transition sets the suppression to false (https://drafts.csswg.org/css-view-transitions-1/#activate-view-transition 2)
- In the next frame, which would no longer be suppressed, we animate the frames (https://drafts.csswg.org/css-view-transitions-1/#handle-transition-frame)
So in essence, activating the transition doesn't necessarily happen in "perform pending transition operations", so it won't be blocked by the suppression flag. The suprression is to freeze the rendering while the new state is updating during the course of the author provided update callback.
Happy to discuss/clarify this further.
from html.
from html.
Tangentially related concern from @mattwoodrow :
Might be worth some more spec clarification though, since it clearly asks for a 'live' snapshot, but also is suggesting that we'd block animations from running. It seems somewhat weird to me that using JS to edit styles while a VT is running would show up, but using a transition/animation (outside of the VT animation that is) would not.
from html.
from html.
Ah thanks. I think confusion came from the fact that the first definition you see in the CSS spec for "rendering suppression for view transitions" mentions redirecting hit-testing, which I (sensibly?) assumed would be done the duration of the whole view transition.
Perhaps the concept could be renamed to detail more precisely why rendering is being suppressed in the context of VT
from html.
@noamr @khushalsagar What is this rendering suppression supposed to avoid?
from html.
It ensures the browser is not rendering frames while the author is asynchronously updating the DOM to the new state.
from html.
Related Issues (20)
- ImageDataSettings should probably be called ImageDataOptions HOT 1
- Standardize marquee UA styles. HOT 2
- Improve handling of malformed unicode bidi control characters HOT 2
- navigable's "is delaying load events" is not reset when navigation aborted
- A way to detect environment such as Workers HOT 2
- Upcoming WHATNOT meeting on 4/11/2024 HOT 1
- Upgrade `structuredClone` options object with `skipNotSerializable` to avoid cloning exceptions
- navigator.cookieEnabled in third-party contexts HOT 10
- intercepting same-document navigation caused by a user' direct address input in browser address bar HOT 4
- Why does the handle attribute changes algorithm of popover associate with all HTML elements HOT 5
- "scripts may run for the newly-created document" never updated for about:blank iframes. HOT 2
- Can messageerror fire on Worker? HOT 4
- ECMAScript's OrdinaryFunctionCreate has another new parameter HOT 2
- Allow slotting indirect children HOT 12
- Not clear purpose of early return in "finalize a same-document navigation" HOT 1
- Upcoming WHATNOT meeting on 4/18/2024 HOT 4
- Module script dependencies and fetch priority
- Proposal: AI Task Meta Tag HOT 1
- Proposal: <more> element HOT 3
- Proposal: <more> element inside <ul>, <ol>, <menu> (or possibly also inside some other elements) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html.