isSupported.js 490 B

123456789101112131415161718
  1. /*
  2. Copyright 2018 Google LLC
  3. Use of this source code is governed by an MIT-style
  4. license that can be found in the LICENSE file or at
  5. https://opensource.org/licenses/MIT.
  6. */
  7. import './_version.js';
  8. /**
  9. * @return {boolean} Whether or not the current browser supports enabling
  10. * navigation preload.
  11. *
  12. * @memberof module:workbox-navigation-preload
  13. */
  14. function isSupported() {
  15. return Boolean(self.registration && self.registration.navigationPreload);
  16. }
  17. export { isSupported };