3 ms·
While there's no realistic way to provide a security boundary between JavaScript modules, Workers are a possibility [1]. The code with the more restricted set
by laurencerowe 4y ago
While there's no realistic way to provide a security boundary between JavaScript modules, Workers are a possibility [1].
The code with the more restricted set of permissions must run in the Worker. That code then communicates with the rest of your app through postMessage / SharedArrayBuffer, perhaps using ComLink [2].
[1] https://deno.land/manual@v1.25.0/runtime/workers#specifying-worker-permissions https://deno.land/manual@v1.25.0/runtime/workers#specifying-...
[2] https://github.com/GoogleChromeLabs/comlink https://github.com/GoogleChromeLabs/comlink