Hi, The purpose of the TW core is to convert TW wikitext into HTML text the can be rendered by the browser.
To achieve that, the core functions have to have access to the browser DOM (Document Object Model)
The main purpose of service workers is, that they are able to prevent data loss, if the client app looses connection to the backend server. But TW is a SPA (single page app). That means it is completely self-contained. That means it can have a server backend, but It does rely on it. That’s by design.
Even if we use TW in a client / server configuration. The server builds a completely independent SPA and sends it to the browser (client). So what you get is still a self-contained SPA.
The main problem with service workers is, that they are not allowed to directly access the DOM.
So the main mechanism, that makes TW work would need to be rewritten, which makes the whole software much more complex, for no real win.
Hope that helps.
Mario