yyx990803 / register-service-worker

A script to simplify service worker registration with hooks for common events.
MIT License
638 stars 58 forks source link

emit 'ready' when service worker is ready #37

Closed bseib closed 4 years ago

bseib commented 4 years ago

Emit the 'ready' event regardless of being on localhost development or in production. When a service worker is active and ready, emit the signal.

Fixes #20

assemblethis commented 4 years ago

I approve this PR. I've been using identical code for my PWA, but still trying to understand if there is any logic behind not firing the 'ready' event for localhost.

sodatea commented 4 years ago

Sorry for the late response and thank you so much for the help. I'll release a new version soon.