1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13

content / test / data / sxg / no-respond-with-service-worker.html [blame]

<script>
async function register(script, scope) {
  const registration = await navigator.serviceWorker.register(
      script, {scope: scope});
  await new Promise(resolve =>
    registration.installing.addEventListener('statechange', resolve));
}
async function initialize() {
  await register('no-respond-with-service-worker.js', './');
  document.title = 'Done';
}
initialize();
</script>