[whatwg] Workers and addEventListener

Zoltan Herczeg zherczeg at inf.u-szeged.hu
Tue Sep 29 00:13:17 PDT 2009


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





More information about the whatwg mailing list