W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

[whatwg] Workers feedback

From: Aaron Boodman <aa@google.com>
Date: Fri, 14 Nov 2008 08:16:22 -0800
Message-ID: <278fd46c0811140816t4163cf3bk108b84cd6e407608@mail.gmail.com>
On Thu, Nov 13, 2008 at 10:17 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> Aaron Boodman wrote:
>>
>> On Thu, Nov 13, 2008 at 8:45 PM, Ian Hickson <ian at hixie.ch> wrote:
>>>
>>> On Thu, 13 Nov 2008, Jonas Sicking wrote:
>>>>
>>>> Actually, i think we should remove the location accessor as well. I
>>>> can't think of a common enough use case that warrants an explicit API.
>>>> You can always transfer the data through postMessage.
>>>
>>> I added that one becase Aaron asked for it. Aaron?
>>
>> I think it's useful. Obviously it's not totally necessary.
>
> What are the use cases? Also note that we can't use it with shared workers
> since they can be connected to several pages from different uris.

It represents the URI of the worker itself, not the URI of the calling page.

In Gears, authors asked us for a location object because they had
applications that could be served from different origins. Also in
Gears, workers can be accessed across origins, so incoming messages
need to be validated that they are from the correct origin. It's more
convenient for a worker to access its own origin through an API the UA
provides than to bake it into the script or send it in the first
postMessage().

Although HTML5 workers don't have the ability to be accessed across
origins, you do have the ability to receive ports that are connected
to other origins, right? So this might still be an issue.

Other than that, I can't think of any specific use cases. It seemed
like a generally useful API to have access to.

- a
Received on Friday, 14 November 2008 08:16:22 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:07 UTC