clientsClaim.js 513 B

123456789101112131415161718
  1. /*
  2. Copyright 2019 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. * Claim any currently available clients once the service worker
  10. * becomes active. This is normally used in conjunction with `skipWaiting()`.
  11. *
  12. * @memberof module:workbox-core
  13. */
  14. function clientsClaim() {
  15. self.addEventListener('activate', () => self.clients.claim());
  16. }
  17. export { clientsClaim };