connect_check_worker.js 268 B

12345678
  1. onmessage = () => {
  2. var protocol = location.protocol.replace('http', 'ws');
  3. var url = protocol + '//' + location.host + '/echo-with-no-extension';
  4. var ws = new WebSocket(url);
  5. ws.onopen = () => postMessage('PASS');
  6. ws.onclose = () => postMessage('FAIL');
  7. }