8000 [css-animationworklet] Change state to be a function instead of getter by majido · Pull Request #866 · w3c/css-houdini-drafts · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
minor - address review feedback
  • Loading branch information
majido committed Mar 11, 2019
commit 50d5a8324102fd618d170f85cd3b98d1bd64ecb5
10 changes: 5 additions & 5 deletions css-animationworklet/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ effect is mutable only in a certain thread). Animation worklet guarantees that a
instance's state is maintained even if the instance is respawned in a different global scope.

The basic mechanism for maintaining the state is that the animation worklet snapshots the local
state that is exposed via {{StatefulAnimator/state}} function and then reifies it so that it can be
passed into the constructor when the animator instance is respawned at a later time in a potentially
different global scope. The <a>migrate an animator instance</a> algorithm specifies this process in
details.
state that is exposed via the {{StatefulAnimator/state}} function and then reifies it so that it can
be passed into the constructor when the animator instance is respawned at a later time in a
potentially different global scope. The <a>migrate an animator instance</a> algorithm specifies this
process in details.

A user-defined stateful animator is expected to fulfill the required contract which is that its
state function returns an object representing its state that can be serialized using structured
Expand Down Expand Up @@ -348,7 +348,7 @@ following steps:


5. If <a>SameValue</a>(|prototype|, {{StatelessAnimator}}) is <b>true</b> set |stateful| to be
<b>false</b>, otherwise if <a>SameValue</a>(|prototype|, {{StatefulAnimator}}) is
<b>false</b>, otherwise if <a>SameValue</a>(|prototype|, {{StatefulAnimator}}) is
<b>true</b> set |stateful| to be <b>true</b>, otherwise <a>throw</a> a <a>TypeError</a> and
abort all these steps.

Expand Down