Files
ladybird/Tests/LibWeb/Text/input/request-animation-frame-order.html
Matthew Olsson c33f6b2ff6 LibWeb: Ensure requestAnimationFrame callbacks run in the proper order
From https://html.spec.whatwg.org/#list-of-animation-frame-callbacks:

    Each target object has a map of animation frame callbacks, which is
    an ordered map that must be initially empty, and an animation frame
    callback identifier, which is a number that must initially be zero.
2024-03-29 06:59:37 +01:00

15 lines
363 B
HTML

<!DOCTYPE html>
<div id="foo"></div>
<script src="include.js"></script>
<script>
test(() => {
for (let i = 0; i < 20; i++) {
// FIXME: Workaround for https://github.com/SerenityOS/serenity/issues/23552
let x = i;
requestAnimationFrame(() => {
println(x);
});
}
});
</script>