playwright/test/assets/networkidle.html
2019-11-19 10:58:15 -08:00

20 lines
389 B
HTML

<script>
async function sleep(delay) {
return new Promise(resolve => setTimeout(resolve, delay));
}
async function main() {
const roundOne = Promise.all([
fetch('fetch-request-a.js'),
fetch('fetch-request-b.js'),
fetch('fetch-request-c.js'),
]);
await roundOne;
await sleep(50);
await fetch('fetch-request-d.js');
}
main();
</script>