Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-animations/crashtests/animation-end.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="test-wait">
<meta charset="utf-8">
<title>Waiting for a composited animation to end should not crash</title>
<style>
@keyframes animation-a {
0% {
transform: scale(1);
opacity: 0.5;
}
}
@keyframes animation-b {
100% {
transform: scale(1);
}
}
</style>
<div style="animation: animation-a .01s .01s 1 linear forwards;">
<div id="target" style="animation: animation-b .1s 0.1s 1 linear forwards;"></div>
</div>
<script>
target.addEventListener('animationend', () => {
document.documentElement.classList.remove('test-wait');
});
</script>
</html>