This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We have straw version of this loader that allows construction like this: web-component.html: <script src="one.js"></script> <link rel="component" href="two.html"> <element name="three"> ... </element> <link rel="component" href="four.html"> <script src="five.js"></script> <element name="six"> ... </element> Ideally the contract is that the script tags are live (executed in main window context), and that each of these things is processed in order. As in the example, 'one.js' must be processed before 'two.html', and so on.
I forgot to mention that all paths are intended to be relative to the url of the linked component document itself, but I believe that's already in the spec.
It seems odd to permit external scripts but not inline scripts.
I agree. I didn't include it my example, but fwiw our polyfill evaluates inline scripts also.
What about other resources? I guess this depends on understanding what exactly does including a <link rel=stylesheet> or <img src> (or <frame srd>) in an import mean.
We use the following rules: >> <link rel=stylesheet> applied as if it was in the main document >> <img src> inert >> <iframe src>) inert
Do you need to keep things that are inert in the document? Ian had an idea today that we introduce a new insertion mode in HTML parser that simply throws away everything that isn't relevant in an import document.
IMO, the expectation is that those nodes are available for manual transplantation into the main document.
(In reply to comment #7) > IMO, the expectation is that those nodes are available for manual > transplantation into the main document. So it's okay if the relative URLs in these elements will be messed up when you move them into main documents? This is the way it works now when you move an element from one doc to another.
(In reply to comment #7) > IMO, the expectation is that those nodes are available for manual > transplantation into the main document. Another thought: can we not just let the authors put these into a template on the imported document?
*** This bug has been marked as a duplicate of bug 23170 ***