summaryrefslogtreecommitdiffstats
path: root/layout/base/tests/chrome/printpreview_images_sw.js
blob: bb0ab60b1fcfc0747bca23bacc664b5ba2d272f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
self.addEventListener("fetch", event => {
  if (event.request.url.includes("nonexistent.png")) {
    event.respondWith(
      fetch(event.request.url.replace("nonexistent.png", "blue-32x32.png"))
    );
  }
});

self.addEventListener("activate", event => {
  event.waitUntil(clients.claim());
});