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

[whatwg] Workers and addEventListener

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 14 Oct 2009 10:32:45 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0910141030480.25383@hixie.dreamhostps.com>
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 explicitly enabled during the 
creation of the dedicated worker (step 12).

> And in the normative text, it is not mentioned that addEventListener 
> should also enable message transmitting.

The normative text just says to fire an event; the DOM Events spec makes 
it clear that events can be handled using addEventListener()-added 

> Anyway, my qestion is:
>   - should addEventListener enable message transmitting?


>   - Should it do it in all cases, or only when "message" is passed as the
> first argument

It should only receive 'message' events if you say 'message' as the first 

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 14 October 2009 03:32:45 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC