blob: 7a453e4055f0848a2250859efb91849e24355e51 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
self.addEventListener('activate', event => {
event.waitUntil(
self.registration.navigationPreload.enable());
});
self.addEventListener('fetch', event => {
event.respondWith(event.preloadResponse
.then(
_ => new Response('PASS: preloadResponse resolved'),
_ => new Response('FAIL: preloadResponse rejected')));
});
|