[html5] Web Workers question
ian at hixie.ch
Thu Jul 29 17:15:02 PDT 2010
On Thu, 22 Apr 2010, Dylan Barrell wrote:
> It seems like the spec
> http://www.whatwg.org/specs/web-workers/current-work/ is somewhat
> confused about whether any documents are available in the
> On the one hand, it says that if the script creating the Worker's global
> object is a Window, then the document should be added to the "worker's
> Documents", but then goes on to say that the DOM API is not available to
> the Worker in this version of the spec.
> How does adding the document to the WorkerGlobalScope help if the DOM
> API is not available?
It's an internal accounting measure to help define the lifetime of the
Worker threads. It's not exposed to the Web author.
> Doesn't this really reduce the usefulness of the Worker object by
> restricting it to tasks that have nothing to do with the DOM - e.g.
> analyzing it as it changes?
Somewhat, but unfortunately exposing DOM APIs to workers requires
substantial work from browser vendors, so it might take some time.
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the Help