Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

registerSW.js 584B

1234567891011121314151617181920
  1. /*
  2. * Register ServiceWorker - load as last script
  3. */
  4. // Wait until page loaded
  5. window.addEventListener('load', () => {
  6. /*if ('serviceWorker' in navigator) {
  7. // NOTE: ServiceWorker Registration
  8. return navigator.serviceWorker.register('serviceWorker.js', {
  9. scope: '/'
  10. }).then(function (registration) {
  11. return console.log('[ServiceWorker] Registration succeeded: ', registration);
  12. }).catch(function (error) {
  13. return console.log('[Service worker] Registration failed: ', error);
  14. });
  15. } else {
  16. console.log('[ServiceWorker] are not supported.');
  17. return;
  18. }*/
  19. });