summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/service-workers/service-worker/resources/import-scripts-redirect-on-second-time-worker.js
blob: f612ab8e6aa4272083abf573978d1932d18f6535 (plain)
1
2
3
4
5
6
7
// This worker imports a script that returns 200 on the first request and a
// redirect on the second request. The resulting body also changes each time it
// is requested.
const params = new URLSearchParams(location.search);
const key = params.get('Key');
importScripts(`update-worker.py?Key=${key}&Mode=redirect&` +
              `Redirect=update-worker.py?Key=${key}%26Mode=normal`);