Skip to content

Instantly share code, notes, and snippets.

@oslego
Created July 16, 2020 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oslego/13951ace1bafc43feb1d2618ca9c37eb to your computer and use it in GitHub Desktop.
Save oslego/13951ace1bafc43feb1d2618ca9c37eb to your computer and use it in GitHub Desktop.
// source https://jsbin.com
<!DOCTYPE html>
<html lang="en">
<head>
<style media="screen">
div {
animation: marker 0s 1;
}
@keyframes marker { to { outline-color: inherit } }
</style>
</head>
<body>
<div></div>
<script type="text/javascript">
document.addEventListener('animationend', (e) => {
console.log(`ANIMATION START ${e.animationName}`)
});
document.addEventListener('animationend', (e) => {
console.log(`ANIMATION END ${e.animationName}`)
});
</script>
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html>
<html lang="en">
<head>
<style media="screen">
div {
animation: marker 0s 1;
}
@keyframes marker { to { outline-color: inherit } }
</style>
</head>
<body>
<div></div>
<script type="text/javascript">
document.addEventListener('animationend', (e) => {
console.log(`ANIMATION START ${e.animationName}`)
});
document.addEventListener('animationend', (e) => {
console.log(`ANIMATION END ${e.animationName}`)
});
<\/script>
</body>
</html>
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment