CoryG
CoryG

Reputation: 2591

Is it possible to use web workers with JavaScript that isn't contained in an external file?

I'm trying to use web workers in a way that doesn't require an external file as the code for the worker, is this possible or does a solution already exist to pipe dynamic code into a web workers?

Upvotes: 3

Views: 164

Answers (1)

gmaliar
gmaliar

Reputation: 5489

You can do this but I'm not sure how well supported it is, moreover it's no longer BlobBuilder but Blob. There will come in handy:

https://developer.mozilla.org/en-US/docs/DOM/Using_web_workers#Spawning_subworkers http://www.html5rocks.com/en/tutorials/workers/basics/#toc-enviornment-subworkers http://updates.html5rocks.com/2012/06/Don-t-Build-Blobs-Construct-Them

Upvotes: 3

Related Questions