On Tue, May 7, 2013 at 4:54 PM, Anne van Kesteren <[email protected]> wrote:
> On Tue, May 7, 2013 at 1:47 PM, Sam Tobin-Hochstadt <[email protected]> wrote:
>> On Tue, May 7, 2013 at 4:33 PM, Anne van Kesteren <[email protected]> wrote:
>>> "Adding"? What's the actual processing model for the default loader
>>> here? I thought it was:
>>>
>>>  1. Append ".js" to module name.
>>>  2. Use the URL parser to parse module name relative to base URL.
>>>  3. Fetch result of that operation.
>>
>> The actual processing model is:
>>
>> 1. Produce a string that is, roughly, System.baseURL + moduleName + ".js".
>> 2. Pass that to the fetch hook (which by default fetches that URL).
>
> Could you be more specific? That seems broken. E.g. often a document's
> base URL will be something like "http://example.org/file.html";.

Sorry, this was overly quick of me. The correct steps are:

0. If we have an absolute URL, skip steps 1-3.
1. Split the module name on "/", url-encode, and rejoin.
2. Append ".js" to module name.
3. Use the URL parser with the base URL to produce an absolute URL.
4. Pass the absolute URL to the fetch hook.

Sam
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to