How do you manipulate DOM using a service worker in Javascript?

Posted by Andre Scott | Updated on

How do you manipulate DOM using a service worker in Javascript?

Service worker can’t access the DOM directly. But it can communicate with the pages it controls by responding to messages sent via the postMessage interface, and those pages can manipulate the DOM.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers