blob: 77ba0c734adcde277b72a7a12f66f201cf5baffc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
function handleFetch(event) {
event.respondWith(new Response("intercepted"));
}
self.oninstall = function(event) {
addEventListener("fetch", handleFetch);
self.onfetch = handleFetch;
};
// Bug 1325101. Make sure adding event listeners for other events
// doesn't set the fetch flag.
addEventListener("push", function() {});
addEventListener("message", function() {});
addEventListener("non-sw-event", function() {});
|