You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Let |transition| be a new {{ViewTransition}} object in [=this's=][=relevant Realm=].
517
517
518
-
1. Set |transition|'s [=ViewTransition/DOM update callback=] to |callback|.
518
+
1. Set |transition|'s [=ViewTransition/update callback=] to |callback|.
519
519
520
520
1. Let |document| be [=this's=][=relevant global object's=][=associated document=].
521
521
522
522
1. If |document|'s [=active DOM transition=] is not null,
523
523
then [=skip the view transition=] |document|'s [=active DOM transition=]
524
524
with an "{{AbortError}}" {{DOMException}} in [=this's=][=relevant Realm=].
525
525
526
-
Note: This can result in two asynchronous [=ViewTransition/DOM update callbacks=] running concurrently.
526
+
Note: This can result in two asynchronous [=ViewTransition/update callbacks=] running concurrently.
527
527
One for the |document|'s current [=active DOM transition=], and another for this |transition|.
528
528
As per the [design of this feature](#transitions-as-enhancements), it's assumed that the developer is using another feature or framework to correctly schedule these DOM changes.
Note: For the most part, a developer using this API does not need to worry about the different phases, since they progress automatically.
623
623
It is, however, important to understand what steps happen in each of the phases: when the snapshots are captured, when pseudo-element DOM is created, etc.
624
624
The description of the phases below tries to be as precise as possible, with an intent to provide an unambiguous set of steps for implementors to follow in order to produce a spec-compliant implementation.
625
625
626
-
: <dfn>DOM update callback</dfn>
627
-
:: an {{UpdateDOMCallback}} or null. Initially null.
626
+
: <dfn>update callback</dfn>
627
+
:: an {{UpdateCallback}} or null. Initially null.
628
628
629
629
: <dfn>ready promise</dfn>
630
630
:: a {{Promise}}.
631
631
Initially [=a new promise=] in [=this's=][=relevant Realm=].
632
632
633
-
: <dfn>DOM updated promise</dfn>
633
+
: <dfn>update callback done promise</dfn>
634
634
:: a {{Promise}}.
635
635
Initially [=a new promise=] in [=this's=][=relevant Realm=].
1. [=Assert=]: |transition|'s [=ViewTransition/phase=] is not "`done`".
887
887
888
-
1. If |transition|'s [=ViewTransition/phase=] is [=phases/before=] "`dom-update-callback-called`", then [=call the DOM update callback=] of |transition|.
888
+
1. If |transition|'s [=ViewTransition/phase=] is [=phases/before=] "`update-callback-called`", then [=call the update callback=] of |transition|.
889
889
890
890
1. Set [=document/transition suppressing rendering=] to false.
0 commit comments