Skip to content

Commit 4da7bc0

Browse files
committed
Use element.animate in "Getting Started"
1 parent c35281a commit 4da7bc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ effect.
3535
<div class="pulse" style="width:150px;">Hello world!</div>
3636
<script>
3737
var elem = document.querySelector('.pulse');
38-
var player = document.timeline.play(new Animation(elem, [
38+
var player = elem.animate([
3939
{opacity: 0.5, transform: "scale(0.5)"},
4040
{opacity: 1.0, transform: "scale(1)"}
4141
], {
42-
direction: "alternate",
42+
direction: 'alternate',
4343
duration: 500,
4444
iterations: Infinity
45-
}));
45+
});
4646
</script>
4747

4848
Web Animations supports off-main-thread animations, and also allows procedural

0 commit comments

Comments
 (0)