W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] Workers and addEventListener

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 15 Oct 2009 21:18:56 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0910152118370.6803@hixie.dreamhostps.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 15 October 2009 14:18:56 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:53 UTC