summaryrefslogtreecommitdiffstats
path: root/devtools/client/netmonitor/test/service-workers/status-codes-service-worker.js
blob: 282c02cfbb93b8fa9573f6282f5bd0d9dc0ad541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

self.addEventListener("activate", event => {
  // start controlling the already loaded page
  event.waitUntil(self.clients.claim());
});

self.addEventListener("fetch", event => {
  const response = new Response("Service worker response", {
    statusText: "OK",
  });
  event.respondWith(response);
});