<!DOCTYPE html> | |
<!-- Counts the number of animation frames that have been served to this frame. --> | |
<script> | |
let rafCount = 0; | |
function raf() { | |
rafCount++; | |
requestAnimationFrame(raf); | |
}; | |
requestAnimationFrame(raf); | |
addEventListener('message', (e) => { | |
e.source.postMessage(rafCount, e.origin); | |
}); | |
</script> | |