workbox-navigation-preload
Advanced tools
Comparing version 5.0.0-alpha.0 to 5.0.0-alpha.1
this.workbox = this.workbox || {}; | ||
this.workbox.navigationPreload = (function (exports, logger_mjs) { | ||
'use strict'; | ||
this.workbox.navigationPreload = (function (exports, logger_js) { | ||
'use strict'; | ||
try { | ||
self['workbox:navigation-preload:5.0.0-alpha.0'] && _(); | ||
} catch (e) {} // eslint-disable-line | ||
// @ts-ignore | ||
try { | ||
self['workbox:navigation-preload:5.0.0-alpha.1'] && _(); | ||
} catch (e) {} | ||
/* | ||
Copyright 2018 Google LLC | ||
/* | ||
Copyright 2018 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
/** | ||
* @return {boolean} Whether or not the current browser supports enabling | ||
* navigation preload. | ||
* | ||
* @memberof workbox.navigationPreload | ||
*/ | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
/** | ||
* @return {boolean} Whether or not the current browser supports enabling | ||
* navigation preload. | ||
* | ||
* @memberof workbox.navigationPreload | ||
*/ | ||
function isSupported() { | ||
return Boolean(self.registration && self.registration.navigationPreload); | ||
} | ||
function isSupported() { | ||
return Boolean(self.registration && self.registration.navigationPreload); | ||
} | ||
/* | ||
Copyright 2018 Google LLC | ||
/* | ||
Copyright 2018 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
/** | ||
* If the browser supports Navigation Preload, then this will disable it. | ||
* | ||
* @memberof workbox.navigationPreload | ||
*/ | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
/** | ||
* If the browser supports Navigation Preload, then this will disable it. | ||
* | ||
* @memberof workbox.navigationPreload | ||
*/ | ||
function disable() { | ||
if (isSupported()) { | ||
self.addEventListener('activate', event => { | ||
event.waitUntil(self.registration.navigationPreload.disable().then(() => { | ||
{ | ||
logger_mjs.logger.log(`Navigation preload is disabled.`); | ||
} | ||
})); | ||
}); | ||
} else { | ||
{ | ||
logger_mjs.logger.log(`Navigation preload is not supported in this browser.`); | ||
function disable() { | ||
if (isSupported()) { | ||
self.addEventListener('activate', event => { | ||
event.waitUntil(self.registration.navigationPreload.disable().then(() => { | ||
{ | ||
logger_js.logger.log(`Navigation preload is disabled.`); | ||
} | ||
})); | ||
}); | ||
} else { | ||
{ | ||
logger_js.logger.log(`Navigation preload is not supported in this browser.`); | ||
} | ||
} | ||
} | ||
} | ||
/* | ||
Copyright 2018 Google LLC | ||
/* | ||
Copyright 2018 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
/** | ||
* If the browser supports Navigation Preload, then this will enable it. | ||
* | ||
* @param {string} [headerValue] Optionally, allows developers to | ||
* [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header) | ||
* the value of the `Service-Worker-Navigation-Preload` header which will be | ||
* sent to the server when making the navigation request. | ||
* | ||
* @memberof workbox.navigationPreload | ||
*/ | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
/** | ||
* If the browser supports Navigation Preload, then this will enable it. | ||
* | ||
* @param {string} [headerValue] Optionally, allows developers to | ||
* [override](https://developers.google.com/web/updates/2017/02/navigation-preload#changing_the_header) | ||
* the value of the `Service-Worker-Navigation-Preload` header which will be | ||
* sent to the server when making the navigation request. | ||
* | ||
* @memberof workbox.navigationPreload | ||
*/ | ||
function enable(headerValue) { | ||
if (isSupported()) { | ||
self.addEventListener('activate', event => { | ||
event.waitUntil(self.registration.navigationPreload.enable().then(() => { | ||
// Defaults to Service-Worker-Navigation-Preload: true if not set. | ||
if (headerValue) { | ||
self.registration.navigationPreload.setHeaderValue(headerValue); | ||
} | ||
function enable(headerValue) { | ||
if (isSupported()) { | ||
self.addEventListener('activate', event => { | ||
event.waitUntil(self.registration.navigationPreload.enable().then(() => { | ||
// Defaults to Service-Worker-Navigation-Preload: true if not set. | ||
if (headerValue) { | ||
self.registration.navigationPreload.setHeaderValue(headerValue); | ||
} | ||
{ | ||
logger_mjs.logger.log(`Navigation preload is enabled.`); | ||
} | ||
})); | ||
}); | ||
} else { | ||
{ | ||
logger_mjs.logger.log(`Navigation preload is not supported in this browser.`); | ||
{ | ||
logger_js.logger.log(`Navigation preload is enabled.`); | ||
} | ||
})); | ||
}); | ||
} else { | ||
{ | ||
logger_js.logger.log(`Navigation preload is not supported in this browser.`); | ||
} | ||
} | ||
} | ||
} | ||
/* | ||
Copyright 2018 Google LLC | ||
/* | ||
Copyright 2018 Google LLC | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
Use of this source code is governed by an MIT-style | ||
license that can be found in the LICENSE file or at | ||
https://opensource.org/licenses/MIT. | ||
*/ | ||
exports.disable = disable; | ||
exports.enable = enable; | ||
exports.isSupported = isSupported; | ||
exports.disable = disable; | ||
exports.enable = enable; | ||
exports.isSupported = isSupported; | ||
return exports; | ||
return exports; | ||
}({}, workbox.core._private)); | ||
//# sourceMappingURL=workbox-navigation-preload.dev.js.map |
@@ -1,2 +0,2 @@ | ||
this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:5.0.0-alpha.0"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",t=>{t.waitUntil(self.registration.navigationPreload.disable().then(()=>{}))})},t.enable=function(t){e()&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{t&&self.registration.navigationPreload.setHeaderValue(t)}))})},t.isSupported=e,t}({}); | ||
this.workbox=this.workbox||{},this.workbox.navigationPreload=function(t){"use strict";try{self["workbox:navigation-preload:5.0.0-alpha.1"]&&_()}catch(t){}function e(){return Boolean(self.registration&&self.registration.navigationPreload)}return t.disable=function(){e()&&self.addEventListener("activate",t=>{t.waitUntil(self.registration.navigationPreload.disable().then(()=>{}))})},t.enable=function(t){e()&&self.addEventListener("activate",e=>{e.waitUntil(self.registration.navigationPreload.enable().then(()=>{t&&self.registration.navigationPreload.setHeaderValue(t)}))})},t.isSupported=e,t}({}); | ||
//# sourceMappingURL=workbox-navigation-preload.prod.js.map |
{ | ||
"name": "workbox-navigation-preload", | ||
"version": "5.0.0-alpha.0", | ||
"version": "5.0.0-alpha.1", | ||
"license": "MIT", | ||
@@ -26,8 +26,9 @@ "author": "Google's Web DevRel Team", | ||
}, | ||
"main": "build/workbox-navigation-preload.prod.js", | ||
"main": "index.js", | ||
"module": "index.mjs", | ||
"types": "index.d.ts", | ||
"dependencies": { | ||
"workbox-core": "^5.0.0-alpha.0" | ||
"workbox-core": "^5.0.0-alpha.1" | ||
}, | ||
"gitHead": "7f231c04023669bc42d5a939d1359b0867e2efda" | ||
"gitHead": "20d2110ddace710a46af06addd4977cae08f5942" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 3 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
45713
29
373
5
1
Updatedworkbox-core@^5.0.0-alpha.1