Le 07/01/2011 12:24, Berend-Jan Wever a écrit :
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 :)
When you say "the DOM", it could mean two things :
- the "document" object (which is bound to what is rendered)
- the DOM APIs (which as far as I'm concern start with the DOMImplementation interface (http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-102161490) which allows you to create documents)

Based on what is written in the forum, I assume it's the former.

Anyway, I had already created a thread on that topic. Here is the response given by Ian Hickson (http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-December/024396.html see last response) : "Since browsers don't have thread-safe DOM implementations, that's basically a non-starter. It doesn't matter that we aren't offering access to the same DOM in pages and workers; the actual innards of the DOM
implementations aren't thread safe.

As soon as browsers are able to implement this, I'm sure it will be added to the spec."

I hope it is the answer to your question.

David

Reply via email to