yyx990803 / register-service-worker

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

Make emit scope accessible to unregister #64

Open abraham opened 2 years ago

abraham commented 2 years ago

unregister passes emit to handleError but doesn't have access to it. This gives emit a default in case unregister gets called before register and raises the scope to be accessible in unregister.