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

[whatwg] Workers feedback

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 14 Nov 2008 12:32:39 -0800
Message-ID: <491DE067.8070205@sicking.cc>
Alexey Proskuryakov wrote:
> 
> Nov 14, 2008, ? 10:00 AM, Jonas Sicking ???????(?):
> 
>>>> 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 returns the script's URL, not the page's.
>>
>> Oh?! Then I understand even less what the use case is. This is 
>> something that doesn't exist for <script> and i've never heard anyone 
>> ask for it (granted, that is not proof that no one wants it).
> 
> Actually, this exists for <script> is you say that it returns the URL 
> that the script execution context uses for resolving relative URLs. It 
> just so happens that for <script>, it's document URL, and for workers, 
> it's script URL.

That works the same in Workers iirc, without the need for a .location API.

Actually, come to think of it, what is the BaseURI for workers? I.e. 
what URI is importScripts and XHR resolved against?

/ Jonas
Received on Friday, 14 November 2008 12:32:39 UTC

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