service-worker check:
- on-load, display error if service worker support is not available - for embeds, display service worker unavailable error right away, don't attempt to load iframe trailing slash check: redirect http://example.com -> http://example.com/ resources/page query: if no query= param is set, use url as query (when switching from replay, url is used as query)
This commit is contained in:
@@ -9,6 +9,11 @@ async function registerSW(name = "sw.js", scope = "./") {
|
||||
resolve = res;
|
||||
reject = rej;
|
||||
});
|
||||
|
||||
if (!navigator.serviceWorker) {
|
||||
console.error("Service Workers not supported");
|
||||
reject();
|
||||
}
|
||||
|
||||
register(scope + name, {
|
||||
registrationOptions: { scope },
|
||||
|
||||
Reference in New Issue
Block a user