ladybird/Tests/LibWeb/Text/input/css/sending-animationcancel-event-crash.html
2025-03-20 11:50:49 +01:00

28 lines
633 B
HTML

<!DOCTYPE html>
<!-- https://github.com/SerenityOS/serenity/issues/24424 -->
<style>
@keyframes anim {
to {
width: 200px;
}
}
div {
animation: anim 1s;
}
</style>
<div id="foo"></div>
<script src="../include.js"></script>
<script>
asyncTest(done => {
const foo = document.getElementById("foo");
const anim = foo.getAnimations()[0];
foo.addEventListener("animationcancel", () => {
println("PASS! (Didn't crash)");
done();
});
requestAnimationFrame(() => {
anim.cancel();
});
});
</script>