LibWeb: Make requestAnimationFrame() callback IDs sequential

This is required by the spec, so let's stop returning random IDs in
favor of a simple sequential integer sequence.
This commit is contained in:
Andreas Kling 2024-08-04 16:36:50 +02:00 committed by Andreas Kling
commit 0e1256e5a4
Notes: github-actions[bot] 2024-08-05 07:13:03 +00:00
6 changed files with 32 additions and 14 deletions

View file

@ -0,0 +1,14 @@
<script src="../include.js"></script>
<script>
var rafIds = [];
asyncTest((done) => {
rafIds.push(requestAnimationFrame(function() {
rafIds.push(requestAnimationFrame(function() {
rafIds.push(requestAnimationFrame(function() {
println(rafIds);
done();
}));
}));
}));
});
</script>