File: networkidle.js

package info (click to toggle)
node-playwright 1.38.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,728 kB
  • sloc: javascript: 114,018; sh: 899; java: 372; xml: 247; cs: 118; python: 29; makefile: 12
file content (12 lines) | stat: -rw-r--r-- 314 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
async function main() {
  window.ws = new WebSocket('ws://localhost:' + window.location.port + '/ws');
  window.ws.addEventListener('message', message => {});

  fetch('fetch-request-a.js');
  window.top.fetchSecond = () => {
    // Do not return the promise here.
    fetch('fetch-request-b.js');
  };
}

main();