Open soobin-lim opened 2 years ago
worker context
ServiceWorkerContainer.register() https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register
If successful, the service worker is executed in a ServiceWorkerGlobalScope; this is basically a special kind of worker context, running off the main script execution thread, with no DOM access.
Service workers demo To demonstrate just the very basics of registering and installing a service worker, we have created a simple demo called sw-test, which is a simple Star wars Lego image gallery. It uses a promise-powered function to read image data from a JSON object and load the images using Ajax, before displaying the images in a line down the page. We’ve kept things static and simple for now. It also registers, installs, and activates a service worker, and when more of the spec is supported by browsers it will cache all the files required so it will work offline!
Transction https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/transaction