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 start()

seems the latter one was preferred by the majority of the people. Ian,
could you do this fix?

Thanks,
Zoltan




[whatwg] Workers and addEventListener

2009-09-29 Thread Zoltan Herczeg
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