Probably this is not possible but I would be glad to hear about alternatives.
I have a large JS script which I want to run in a SharedWorker, but without uploading it to a server before running (it's included in a library which I want to distribute).
With Dedicated Worker I can simply make a Blob. But the Blob URL is unique and also his lifetime is tied to the lifetime of the window that creates it.
What I need is a way to create SharedWorker from a string but this worker should have a URL that any other page should be able to compute exactly. Base64 strings are limited in size, so my question is if there are any alternatives to it.