Re: [ServiceWorker] ServiceWorker constructor instead of navigator.serviceWorker (#660)

Yeah, taste and consistency. Also, a constructor shouldn't change state outside its own object. In the case of creating a new ServiceWorker registration, that's added to an underlying registry, so the effects persist even if the registration object on the page is garbage collected.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/660#issuecomment-86127388

Received on Wednesday, 25 March 2015 17:16:11 UTC