ladybird/Tests/LibWeb/Text/input/WebAnimations/misc/animation-events-basic.html
Gingeh e96338dd63
Some checks are pending
CI / macOS, arm64, Sanitizer_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers_CI, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer_CI, Clang (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
LibWeb: Don't play initially-paused animations
2025-06-18 17:17:29 +02:00

47 lines
1.2 KiB
HTML

<!doctype html><style>
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f0f0;
}
div {
width: 100px;
height: 100px;
background-color: #3498db;
position: relative;
animation: moveRight 0.1s linear;
animation-play-state: paused;
}
@keyframes moveRight {
0% {
left: 0;
}
100% {
left: 100px;
}
}
</style>
<body>
<script src="../../include.js"></script>
<div id="d"></div>
<script>
asyncTest(done => {
let div = document.getElementById("d");
div.addEventListener("animationstart", () => {
println("animationstart");
});
div.addEventListener("animationend", () => {
println("animationend");
div.style.animationPlayState = "paused";
div.style.display = "none";
done();
});
div.style.animationPlayState = "running";
});
</script>
</body>