trisquel-icecat/icecat/testing/web-platform/tests/requestidlecallback/resources/child.html
2025-10-06 02:35:48 -06:00

17 lines
378 B
HTML

<!doctype html>
<h2>Child Frame</h2>
<script>
onload = () => {
let count = 0;
const loop = () => {
if (++count < 10) {
requestIdleCallback(loop);
} else {
const target = location.href.replace('www1.', '')
.replace('resources/child.html', '');
window.parent.postMessage('done', target);
}
};
requestIdleCallback(loop);
}
</script>