Re: Referencing modules loaded by HTML Imports.

2014-08-20 Thread John Barton
On Tue, Aug 19, 2014 at 4:22 PM, Ian Hickson i...@hixie.ch wrote: On Mon, 18 Aug 2014, John Barton wrote: I think we could also imagine that such an import declaration could be used without the HTML Import declaration. The fetch() call will ask for baseURL/foo/b.js and the server will say

Re: Referencing modules loaded by HTML Imports.

2014-08-19 Thread John Barton
I think that only makes sense if 'this.import()' worked for script-tags-marked-as-modules in general. If the general case supported it, then it should just work for HTML imports. OTOH, I think System.import() is clearer. jjb On Mon, Aug 18, 2014 at 6:23 PM, Matthew Robb matthewwr...@gmail.com

Re: Referencing modules loaded by HTML Imports.

2014-08-19 Thread Ian Hickson
On Mon, 18 Aug 2014, John Barton wrote: On Mon, Aug 18, 2014 at 2:06 PM, Ian Hickson i...@hixie.ch wrote: Now, in the main page, you reference the HTML import: link rel=import href=foo.html Now how would you refer to the modules? We can't have #b refer

Referencing modules loaded by HTML Imports.

2014-08-18 Thread John Barton
On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson i...@hixie.ch wrote: To avoid overly spamming the list I've coallesced my responses to various threads over the weekend into this one e-mail. I really think this makes the discussion more difficult to follow and certainly more difficult to

Re: Referencing modules loaded by HTML Imports.

2014-08-18 Thread Ian Hickson
On Mon, 18 Aug 2014, John Barton wrote: On Mon, Aug 18, 2014 at 10:43 AM, Ian Hickson i...@hixie.ch wrote: To avoid overly spamming the list I've coallesced my responses to various threads over the weekend into this one e-mail. I really think this makes the discussion more difficult to

Re: Referencing modules loaded by HTML Imports.

2014-08-18 Thread John Barton
On Mon, Aug 18, 2014 at 2:06 PM, Ian Hickson i...@hixie.ch wrote: Now, in the main page, you reference the HTML import: link rel=import href=foo.html Now how would you refer to the modules? We can't have #b refer to it, since the scope of IDs is per-document,

Re: Referencing modules loaded by HTML Imports.

2014-08-18 Thread Matthew Robb
Would there be any problems treating the html import as a virtual module itself. Giving all scripts inside the sub document the module context object as its this binding? Then to do any additional loading you'd need to do this.import(). On Aug 18, 2014 6:56 PM, John Barton johnjbar...@google.com