Skip to content

Commit 45ec818

Browse files
committed
[css-animations-2] Update code sample
Effects no longer need to be cloned in order to be mutated.
1 parent 49ff64f commit 45ec818

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

css-animations-2/Overview.bs

+1-3
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,11 @@ elem.style.animation = 'move 1s';
131131
let animation = elem.getAnimations()[0];
132132
// animation.effect.target == elem == animation's owning element
133133
134-
let mutableEffect = animation.effect.clone();
135-
animation.effect = mutableEffect;
136134
animation.effect.target = elem2;
137135
// animation.effect.target == elem2 != animation's owning element
138136
139137
animation.effect = null;
140-
// animation.effect.target is undefined != animation's owning element
138+
// animation.effect?.target is undefined != animation's owning element
141139
</pre>
142140
143141
</div>

0 commit comments

Comments
 (0)