blob: 3c8992e97773c672aafdb80781edfca1bd5b22ed [file] [log] [blame]
<!DOCTYPE html>
<meta charset=utf-8>
<title>Canceling an animation inside requestAnimationFrame</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<body>
<script>
async_test(t => {
var anim = document.body.animate([], 1000);
anim.addEventListener('cancel', () => {
t.done();
});
requestAnimationFrame(() => {
anim.cancel();
});
}, 'Animation cancel event happens if animation cancelled in raf');
</script>