blob: 39f11baf8cb965988cf6a2f0abf914b1484ec63c (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
self.addEventListener('fetch', function(event) {
event.respondWith(
fetch(event.request)
.then(
function(response) {
return response;
},
function(error) {
return new Response('Error:' + error);
}));
});
|