[whatwg] Workers in HTML5

Maciej Stachowiak mjs at apple.com
Tue Feb 19 18:05:01 PST 2008


On Feb 19, 2008, at 2:57 PM, Aaron Boodman wrote:

> On Tue, Feb 19, 2008 at 2:58 PM, Anne van Kesteren  
> <annevk at opera.com> wrote:
>> Given that most people don't know the difference between the Window  
>> and
>> the global object and the global worker object will already contain a
>> bunch of APIs identical to those on the Window object it seems to  
>> me that
>> giving the object and interface a different name doesn't really help.
>
> I'm not necessarily sold on making the worker context be the global
> object. I always thought having the Window object be the global object
> was a bit unfortunate, myself.
>
> What if we had separate objects:
>
> - the global scope (with all the typical JS globals, and maybe  
> XMLHttpRequest)
> - workerContext (with all the worker stuff, plus cookies, location,  
> etc)
>
> Thoughts?

If XMLHttpRequest is one of the APIs available on background threads,  
does that include its XML parsing/serialization features (responseXML  
and the ability to pass a Document as the post data)? If so, then  
effectively the whole DOM API has to be available on the background  
thread, which may increase the implementation complexity a fair bit  
over having only selected APIs available.

Regards,
Maciej




More information about the whatwg mailing list