-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheaas-sw.js
22 lines (16 loc) · 961 Bytes
/
eaas-sw.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// importScripts(`https://emulation-as-a-service.gitlab.io/eaas-proxy/module-loader.js?${new URL(location.search.slice(1), location)}`);
self.window = self;
importScripts("https://emulation-as-a-service.gitlab.io/eaas-proxy/lib/xhr.js");
// importScripts("https://unpkg.com/browser-es-module-loader@0.4.1/dist/babel-browser-build.js");
// importScripts("https://unpkg.com/browser-es-module-loader@0.4.1/dist/browser-es-module-loader.js");
importScripts("https://cdn.jsdelivr.net/gh/rafaelgieschke/browser-es-module-loader@master/dist/babel-browser-build.js");
importScripts("https://cdn.jsdelivr.net/gh/rafaelgieschke/browser-es-module-loader@master/dist/browser-es-module-loader.js");
const moduleURL = new URL("./http-request/index.js", new Error().stack.match(/https?:\/\/.+/));
new BrowserESModuleLoader().import(String(moduleURL));
self.oninstall = () => {
skipWaiting();
};
self.onactivate = () => {
clients.claim();
};
self.onfetch = () => {};