-
Notifications
You must be signed in to change notification settings - Fork 756
[css-view-transitions-1] Clarify how unhandled rejections should work #8451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -936,8 +936,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn; | |
| [Exposed=Window] | ||
| interface ViewTransition { | ||
| readonly attribute Promise<undefined> updateCallbackDone; | ||
| readonly attribute Promise<undefined> ready; | ||
| readonly attribute Promise<undefined> finished; | ||
| [SameObject] readonly attribute Promise<undefined> ready; | ||
| [SameObject] readonly attribute Promise<undefined> finished; | ||
| undefined skipTransition(); | ||
| }; | ||
| </xmp> | ||
|
|
@@ -1009,15 +1009,23 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn; | |
|
|
||
| : <dfn>ready promise</dfn> | ||
| :: a {{Promise}}. | ||
| Initially [=a new promise=] in [=this's=] [=relevant Realm=]. | ||
| Initially [=a new promise=] in [=this's=] [=relevant Realm=], [=marked as handled=]. | ||
|
|
||
| Note: This is [=marked as handled=] to avoid {{unhandledrejection}}s prior to the {{ViewTransition/ready}} property being accessed. | ||
|
|
||
| : <dfn>update callback done promise</dfn> | ||
| :: a {{Promise}}. | ||
| Initially [=a new promise=] in [=this's=] [=relevant Realm=]. | ||
|
|
||
| Note: This promise is not initially [=marked as handled=], | ||
| so rejections will be {{unhandledrejection}}s, | ||
| even if the {{ViewTransition/updateCallbackDone}} property is not accessed. | ||
|
|
||
| : <dfn>finished promise</dfn> | ||
| :: a {{Promise}}. | ||
| Initially [=a new promise=] in [=this's=] [=relevant Realm=]. | ||
| Initially [=a new promise=] in [=this's=] [=relevant Realm=], [=marked as handled=]. | ||
|
|
||
| Note: This is [=marked as handled=] to avoid {{unhandledrejection}}s prior to the {{ViewTransition/finished}} property being accessed. | ||
|
|
||
| : <dfn>transition root pseudo-element</dfn> | ||
| :: a ''::view-transition''. | ||
|
|
@@ -1032,9 +1040,12 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn; | |
| [Discussion of this behavior](https://github.com/w3c/csswg-drafts/issues/8045). | ||
| </dl> | ||
|
|
||
| The {{ViewTransition/finished}} [=getter steps=] are to return [=this's=] [=ViewTransition/finished promise=]. | ||
| The {{ViewTransition/finished}} [=getter steps=] are to return [=a promise resolved with=] [=this's=] [=ViewTransition/finished promise=]. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will return a new promise each time, since the getter steps are run each time. (Even if [SameObject] were allowed, it doesn't do magic caching behavior for you; it's more of a code comment. See whatwg/webidl#212.)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh, TIL. I could have sworn I'd seen specs written assuming SameObject had this effect. |
||
|
|
||
| The {{ViewTransition/ready}} [=getter steps=] are to return [=a promise resolved with=] [=this's=] [=ViewTransition/ready promise=]. | ||
|
|
||
| The {{ViewTransition/ready}} [=getter steps=] are to return [=this's=] [=ViewTransition/ready promise=]. | ||
| Note: These properties return a new promise that is not [=marked as handled=]. | ||
| They always return the same promise due to {{SameObject}}. | ||
|
|
||
| The {{ViewTransition/updateCallbackDone}} [=getter steps=] are to return [=this's=] [=ViewTransition/update callback done promise=]. | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not valid Web IDL, technically. whatwg/webidl#71