I have a very simple need, I need to spawn a webworker with a small data uri script:
new Worker('data:,console.log("HI")');
In Firefox this is giving me instead an error. Error is:
SecurityError: Failed to load worker script at "data:,console.log("HI")"
Is there anyway to get worker to work with data URI?
You could definitely try Freelancer
which:
function
that it transforms to a string using Function.prototype.toString
Blob
with application/javascript
as the typeURL.createObjectURL
.