[whatwg] Combining the DedicatedWorker and SharedWorker interfaces

Alexey Proskuryakov ap at webkit.org
Wed Nov 12 14:29:45 PST 2008

Nov 12, 2008, в 9:26 PM, Aaron Boodman написал(а):

>>> * Add startConversation() to SharedWorker, but rename it "connect()"
>>> and make the onconnect event fire inside the worker each time it is
>>> called.
>> What event do you suggest to dispatch in the worker when connect() is
>> called?
> I meant "connect". The same "connect" event (I'm not sure of the
> constructor off the top of my head) that Hixie originally had being
> fired when new clients create new instances of a shared worker.

Ok. That's "a MessageEvent interface, with the name connect". In our  
current implementation, all MessageEvents have the name "message", but  
I now see that this doesn't follow from anything HTML5 says about  

I'm fine with dispatching a MessageEvent named "connect" here.

>> From the above, it formally follows that a MessageEvent with name
>> "message" is dispatched
> How does that follow?

Well, that's what MessagePort.startConversation() sends, and the  
proposal only said that connect() is a renamed startConversation()  
from Worker (also, "The postMessage() and startConversation() methods  
on Worker objects must act as if, when invoked, they immediately  
invoked the method of the same name on the port, with the same  

- WBR, Alexey Proskuryakov

More information about the whatwg mailing list