Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/webappapis/animation-frames/callback-multicalls.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="utf-8">
<title>AnimationTiming Test: multiple calls to requestAnimationFrame with the same callback</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
async_test(function(t) {
var counter = 0;
window.requestAnimationFrame(callback);
function callback() {
++counter;
if (counter == 2) {
t.done();
} else {
window.requestAnimationFrame(callback);
}
};
}, "Check that multiple calls to requestAnimationFrame with the same callback will result in multiple entries being in the list with that same callback.");
</script>