W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2012

RE: Shared workers - use .source instead of .ports[0] ?

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Tue, 10 Apr 2012 18:26:04 +0000
To: Simon Pieters <simonp@opera.com>, Jarred Nicholls <jarred@webkit.org>
CC: Jonas Sicking <jonas@sicking.cc>, "public-webapps@w3c.org" <public-webapps@w3c.org>
Message-ID: <9768D477C67135458BF978A45BCF9B38382BFCE3@TK5EX14MBXW602.wingroup.windeploy.ntdev.microsoft.com>
>-----Original Message-----
>From: Simon Pieters [mailto:simonp@opera.com]
>Sent: Tuesday, April 10, 2012 5:27 AM
>To: Jarred Nicholls
>Cc: Jonas Sicking; public-webapps@w3c.org
>Subject: Re: Shared workers - use .source instead of .ports[0] ?
>
>On Tue, 10 Apr 2012 14:01:47 +0200, Jarred Nicholls <jarred@webkit.org>
>wrote:
>
>> On Tue, Apr 10, 2012 at 1:20 AM, Simon Pieters <simonp@opera.com> wrote:
>>
>>> On Wed, 04 Apr 2012 18:37:46 +0200, Jonas Sicking <jonas@sicking.cc>
>>> wrote:
>>>
>>>  Sounds great to me. The ports attribute is basically useless except in
>>>> this
>>>> one instance since ports are these days expose as part of structured
>>>> clones.
>>>>
>>>> Avoiding using it in this arguably weird way in this one instance seems
>>>> like a win to me.
>>>>
>>>
>>> I'd like to have an opinion from WebKit and Microsoft about this
>>> proposal.
>>> Can someone comment or cc relevant people, please?
>>>
>>
>> FWIW this to me seems like a good improvement to the intuitiveness.
>
>OK. To make things clear, are you OK with making this change in WebKit?
>
>> Since
>> a MessageEvent interface is being used, qualifying that *source*
>> WindowProxy
>> is populated is all that's needed?
>
>It wouldn't be a WindowProxy, but a port. I'd also make .ports null. The
>IDL for MessageEvent's source member would need to change type from
>WindowProxy? to object?.

IE10 does not implement SharedWorkers at the present time. We also don’t yet implement the updated "Transferrable" notion for MessagePorts in the structured clone algorithm. We do ship Workers now, and so my primary concern is that the spec doesn't remove the "ports" property of the MessageEvent.

I don't mind the proposal to re-use .source of MessageEvent for a "connect" event on a SharedWorker. I think it's a bit ugly to swap the "WindowProxy" type of .source to "any" just for this case. I am curious to see where this latest discussion on perhaps using a different Event interface for "connect" events will lead...



Received on Tuesday, 10 April 2012 18:27:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:51 GMT