This could be contained in a Worker iframe (iirc).
A method of invoking this could be Devvit.clientScript('script.ts') (or just the old new Worker)
This could work like a Worker, in a way that you get access to things like self events (mouse events, resize events, drag events, etc.), and IndexedDB (Client storage, idk how useful this would be tho). The Workers postMessage could also work for client-server messages (idea).
This could be contained in a Worker iframe (iirc).
A method of invoking this could be Devvit.clientScript('script.ts') (or just the old new Worker)
This could work like a Worker, in a way that you get access to things like self events (mouse events, resize events, drag events, etc.), and IndexedDB (Client storage, idk how useful this would be tho). The Workers postMessage could also work for client-server messages (idea).