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

[whatwg] Workers and addEventListener

From: Zoltan Herczeg <zherczeg@inf.u-szeged.hu>
Date: Tue, 29 Sep 2009 09:13:17 +0200 (CEST)
Message-ID: <1430.160.114.36.211.1254208397.squirrel@webmail.inf.u-szeged.hu>
Hi all,

I am Zoltan Herczeg from University of Szeged, Hungary. I am a member of a
team who working on WebKit browser engine.

In this bug report: https://bugs.webkit.org/show_bug.cgi?id=29801 , Alexey
suggested me that I should contact you about my qestion.

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.
However, after the dummy is assigned, the callback functions passed to
addEventListener start receiving messages.

The shared workers example here http://www.w3.org/TR/workers/ in section
1.2.4 suggests that addEventListener should also enable message
transmitting. However, as Alexey pointed out, the examples are
non-normative. And in the normative text, it is not mentioned that
addEventListener should also enable message transmitting. I feel the
workaround to enable message transmitting for addEventListener is ...
'dumb' now.

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

Zoltan
Received on Tuesday, 29 September 2009 00:13:17 UTC

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