Are there any Webxdc runtime which works directly in browser?

I have an experimental implementation with PWA (prograssive web app) and service worker.
The advantage of service worker is that the app can rewrite the url and response from any address
with onfetch event, so the relative path in the zip file can work.
The Web Extension can not do this now.

the project:

I have not work on it for a while, and never setup it as a real pwa work on gitlab,
but it should work if you enable service worker in http mode and run it on localhost.
It can play 2048 and some other games.

The most serious issue is that all webxdc app share a same localstorage and indexeddb.
I think we can wrap the window.localStorage and window.indexedDB to overcome this,
and hope the javascript code will not check the idb’s name or bypass the wrapped api.

Another problem I faced is import and export data. import/export localStorage is easy,
but it would be tedious to export a indexed db;
we need to export version, indices and blobs.

(maybe I should not call it a webxdc runtime, since the spec require webxdc runtime to block all connection to internet.)

1 Like