Re: [whatwg] Workers and addEventListener

2009-10-18 Thread Ian Hickson
On Fri, 16 Oct 2009, Zoltan Herczeg wrote: I would not be opposed to changing the spec to include enabling a port's message queue when addEventListener(message) is invoked. I'm reluctant to make addEventListener() do magic. we have two choices: - extend addEventListener - fix

Re: [whatwg] Workers and addEventListener

2009-10-16 Thread Zoltan Herczeg
I would not be opposed to changing the spec to include enabling a port's message queue when addEventListener(message) is invoked. I'm reluctant to make addEventListener() do magic. we have two choices: - extend addEventListener - fix the Shared Worker example on the whatwg site to call

Re: [whatwg] Workers and addEventListener

2009-10-15 Thread Drew Wilson
On Wed, Oct 14, 2009 at 3:33 AM, Ian Hickson i...@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

Re: [whatwg] Workers and addEventListener

2009-10-15 Thread Drew Wilson
To be absolutely clear (since there's some confusion about whether we are talking about explicit MessagePorts, or about implicit ports for dedicated workers). Are you saying that this: var channel = new MessageChannel(); channel.port1.postMessage(hi mom); channel.port2.addEventListener(message,

Re: [whatwg] Workers and addEventListener

2009-10-15 Thread Anne van Kesteren
On Thu, 15 Oct 2009 19:54:23 +0200, Drew Wilson atwil...@google.com wrote: I would not be opposed to changing the spec to include enabling a port's message queue when addEventListener(message) is invoked. FWIW, I would be opposed to any change to addEventListener() that makes it do

Re: [whatwg] Workers and addEventListener

2009-10-15 Thread Ian Hickson
On Thu, 15 Oct 2009, Drew Wilson wrote: On Wed, Oct 14, 2009 at 3:33 AM, Ian Hickson i...@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

Re: [whatwg] Workers and addEventListener

2009-10-15 Thread Ian Hickson
On Thu, 15 Oct 2009, Drew Wilson wrote: To be absolutely clear (since there's some confusion about whether we are talking about explicit MessagePorts, or about implicit ports for dedicated workers). Are you saying that this: var channel = new MessageChannel();

Re: [whatwg] Workers and addEventListener

2009-10-14 Thread Ian Hickson
On Tue, 29 Sep 2009, Zoltan Herczeg wrote: In WebKit implementation of MessagePort the addEventListener(message, ...) does not enable the transmitting of messages. All messages are actually discarded until a dummy function is assigned to onmessage. That is a bug. The port message queue is

Re: [whatwg] Workers and addEventListener

2009-10-14 Thread Ian Hickson
On Tue, 29 Sep 2009, Drew Wilson wrote: The intent of the spec is fairly clear that addEventListener(message) should not start the message queue dispatch - only setting the onmessage attribute does that: The first time a MessagePort #messageport object's

Re: [whatwg] Workers and addEventListener

2009-09-29 Thread Drew Wilson
The intent of the spec is fairly clear that addEventListener(message) should not start the message queue dispatch - only setting the onmessage attribute does that: The first time a MessagePort #messageport object's onmessage#handler-messageport-onmessage IDL attribute is set, the port's port