[whatwg] WebWorkers and images

Hey all,

I read that giving WebWorkers access to the DOM is apparently a bad idea:
http://forums.whatwg.org/viewtopic.php?t=4437
However, the page does not mention why. I'd like to know :)

I ask because I wanted to port an image manipulation script to a WebWorker,
but found out that WebWorkers have no way to use elements such as canvas and
img. As a result, its easier not to use WebWorkers but create my own
task-schedular using timers in the webpage. To keep things simple, I'll
reuse that same code for other tasks as well, rather than user WebWorkers.

I wonder how many people find that WebWorkers are too limited and will avoid
them for this reason. I also wonder what additional features WebWorkers
would need to make them useful for media manipulation. I assume a WebWorker
would not need full DOM access: it would only need to be allowed to create
img, canvas, video and audio elements and these would need to be
serializable in some way, so they can be sent back and forth between the web
page and WebWorker.

I assume you've discussed this before, but couldn't find any record. Please
let me know if there is a document somewhere that explains why WebWorkers
have so little access to browser features.

Cheers,
BJ


Berend-Jan Wever (SkyLined at google.com) | Security Software Engineer
Google Netherlands B.V. | Reg: Claude Debussylaan 34, 15th floor 1082 MD
Amsterdam
34198589 | NETHERLANDS | VAT / Tax ID:- 812788515 B01

Received on Friday, 7 January 2011 03:24:41 UTC