summaryrefslogtreecommitdiffstats
path: root/dom/workers/test/serviceworkers/fetch/sandbox/sandbox_test.js
blob: 1ed351794e3c7b3c12a67c561893466ba1681056 (plain)
1
2
3
4
5
self.addEventListener("fetch", function(event) {
  if (event.request.url.indexOf("index.html") >= 0) {
    event.respondWith(fetch("intercepted_index.html"));
  }
});