summaryrefslogtreecommitdiffstats
path: root/dom/serviceworkers/test/performance/sw_intercept_target.js
blob: 47b38539782975121033ac8547963ec7296308b1 (plain)
1
2
3
4
5
6
7
"use strict";

onfetch = function (event) {
  if (event.request.url.indexOf("target.txt") != -1) {
    event.respondWith(fetch("intercepted.txt"));
  }
};