[whatwg] Workers and addEventListener

Ian Hickson ian at hixie.ch
Thu Oct 15 14:18:56 PDT 2009


On Thu, 15 Oct 2009, Drew Wilson wrote:
> On Wed, Oct 14, 2009 at 3:33 AM, Ian Hickson <ian at hixie.ch> wrote:
> >
> > There's no start() to call, since there's no explicit pointer to the 
> > MessagePort in dedicated workers.
>
> The example in the worker spec refers to shared workers, which *do* have 
> an explicit port, and do not automatically start the port.
> 
> Search for addEventListener in this document: 
> http://www.whatwg.org/specs/web-workers/current-work/#shared-workers
> 
> And you'll see what I mean.

Ah, yes, for shared workers you need to call start() (or use .onmessage).

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list