summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/service-workers/service-worker/resources/import-scripts-404-after-update-plus-update-worker.js
blob: e9899d8e7274ea8b65623e019411700ec65dbc84 (plain)
1
2
3
4
5
6
7
8
// This worker imports a script that returns 200 on the first request and 404
// on the second request, and a script that is updated every time when
// requesting it.
const params = new URLSearchParams(location.search);
const key = params.get('Key');
const additional_key = params.get('AdditionalKey');
importScripts(`update-worker.py?Key=${key}&Mode=not_found`,
              `update-worker.py?Key=${additional_key}&Mode=normal`);