summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/presentation-api/receiving-ua/support/serviceworker.js
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/presentation-api/receiving-ua/support/serviceworker.js')
-rw-r--r--testing/web-platform/tests/presentation-api/receiving-ua/support/serviceworker.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/web-platform/tests/presentation-api/receiving-ua/support/serviceworker.js b/testing/web-platform/tests/presentation-api/receiving-ua/support/serviceworker.js
new file mode 100644
index 0000000000..d2d4449ded
--- /dev/null
+++ b/testing/web-platform/tests/presentation-api/receiving-ua/support/serviceworker.js
@@ -0,0 +1,9 @@
+self.addEventListener('install', () => {
+ // activate this service worker immediately
+ self.skipWaiting();
+});
+
+self.addEventListener('activate', event => {
+ // let this service worker control window clients immediately
+ event.waitUntil(self.clients.claim());
+});