[whatwg] Combining the DedicatedWorker and SharedWorker interfaces

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  
MessageEvents.

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  
arguments").

- WBR, Alexey Proskuryakov

Received on Wednesday, 12 November 2008 14:29:45 UTC