Created
August 2, 2019 11:58
-
-
Save cristinecula/e712c362021184349af5a2db7d09b6ab to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/cozuyahiyo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
Test | |
<script id="jsbin-javascript"> | |
const animation = document.body.animate([{opacity: 0}, {opacity: 1}], 500) | |
animation.cancel() | |
animation.onfinish = event => { | |
console.log('onfinish', animation.playState) | |
} | |
animation.oncancel = event => { | |
console.log('oncancel', animation.playState) | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">const animation = document.body.animate([{opacity: 0}, {opacity: 1}], 500) | |
animation.cancel() | |
animation.onfinish = event => { | |
console.log('onfinish', animation.playState) | |
} | |
animation.oncancel = event => { | |
console.log('oncancel', animation.playState) | |
}</script></body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const animation = document.body.animate([{opacity: 0}, {opacity: 1}], 500) | |
animation.cancel() | |
animation.onfinish = event => { | |
console.log('onfinish', animation.playState) | |
} | |
animation.oncancel = event => { | |
console.log('oncancel', animation.playState) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment