@serwist/window
Version:
Simplifies communications with Serwist packages running in the service worker
10 lines (9 loc) • 384 B
JavaScript
//#region src/utils/isCurrentPageOutOfScope.ts
const isCurrentPageOutOfScope = (scope) => {
const scopeURL = new URL(scope, document.baseURI);
const scopeURLBasePath = new URL("./", scopeURL.href).pathname;
return !location.pathname.startsWith(scopeURLBasePath);
};
//#endregion
export { isCurrentPageOutOfScope as t };
//# sourceMappingURL=isCurrentPageOutOfScope-vi3IAsNY.js.map