Re: [webcomponents] [imports] <import src='header.html'/> in <body> (#280)

> Still I don't see the answer to the question why HTML Import in the body can not be made the part of this spec?

@techtonik as much as I agree with you that there should be such a functionality, I have to say that I don't see any clear way to put this than what @chris-l has said above. Perhaps your lack of familiarity with `require` is the barrier here. These are fundamentally different concepts:

- **HTML imports** is similar to Node.js' `require` or Python's `import`, in that it gets stuff ready to be used in your code. Sort of like placing tools in your toolbox to be in hands' reach. (I am not entirely sure if importing, say, CSS resources doesn't apply them immediately, which might be confusing in this regard)

- A hypothetical **HTML includes** functionality would function like PHP's `include`, directly inserting HTML content into the current document, like iframe currently does but more integrated (think `<img>`, `<video>`, etc). I'd totally back a proposal for such a spec, which as mentioned in the passage I quoted above, is sorely lacking in HTML.

@chris-l any thoughts on whether such a spec could/should be part of the Web Components family?

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/280#issuecomment-122516860

Received on Saturday, 18 July 2015 09:19:23 UTC