fune/dom/serviceworkers/test/performance/sw_intercept_target.js
Joshua Marshall b831405fb6 Bug 1299271 - Service worker performance test r=asuth,sparky
These are a first-cut of service worker performance tests, just running as
vanilla mochitests for now.  Bug 1832059 tracks the integration work necessary.

Differential Revision: https://phabricator.services.mozilla.com/D177427
2023-11-28 16:33:38 +00:00

7 lines
155 B
JavaScript

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