Comments (6)
Ah I've just spotted mine returns a promise but the spec says it is a promise itself.
Thanks for pointing that out. I'll correct this tomorrow and push out an update.
from view-transitions-api-types.
I'm going to go ahead and close this for now as the types match the specification but feel free to open a new one in future if the spec updates.
from view-transitions-api-types.
My type matches the spec here right specifying a promise return?
from view-transitions-api-types.
Please correct me if I've misunderstood.
from view-transitions-api-types.
Firstly apologies for the delay in getting back to this.
@jantimon sorry can I just double check is there actually an issue with my code. I re-read the spec an it appears it does in fact match my types. UpdateCallback is a callback that returns Promise like my type does.
It also partly matches https://github.com/nuxt/nuxt/blob/ceab38770d5e80929518cfd5c71081756288bb55/packages/nuxt/src/app/plugins/view-transitions.client.ts#L5
Nuxt is also allowing a void return type for the callback which doesn't seem to actually match the spec?
from view-transitions-api-types.
looks good to me 👍
you are right according to
https://developer.mozilla.org/en-US/docs/Web/API/ViewTransition
and
https://drafts.csswg.org/css-view-transitions/#callbackdef-updatecallback
the return type of updateCallback has to be a promise:
Then, when the promise returned by updateCallback fulfills, the new state of the document is captured and the transition is initiated.
however the current implementation in chrome seems to allow void
too
from view-transitions-api-types.
Related Issues (1)
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 view-transitions-api-types.