- From: Jourdan <notifications@github.com>
- Date: Tue, 18 Apr 2017 07:35:04 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/webcomponents/issues/636/294864413@github.com>
@rniwa @hayatoito @TakayoshiKochi Thank you all for your comments and suggestions! @TakayoshiKochi You are correct, server-side includes are **exactly** what I'm looking to replicate client-side. Thanks for inferring that! Although I might be misunderstanding the purpose of HTML Imports, it seems to me that *a very common use case* for web components, generally, will be to replicate server-side includes — whether or not encapsulation is considered. The ability to compose HTML from different files (i.e. 'partials') together into a single page (without `<iframe>`) seems to be one of the possibilities developers see web components providing, e.g: - http://starcounter.io/html-partialsincludes-webcomponents-way/ - https://www.webcomponents.org/element/Juicy/juicy-html - https://www.linkedin.com/pulse/html-5-web-components-john-peters - http://www.baasic.com/2014/10/18/Designing-for-the-future-Baasic-meets-Polymer-part-1/ - https://teamtreehouse.com/community/do-html-partials-exist Further, I believe that in most situations imported `<template>` content *will* be attached to the main document. A web component, after all, will likely in many cases be an encapsulated piece of UI. Composing an HTML file from many smaller HTML files (i.e. 'partials') is, I believe, a *very* common requirement, and *web components are and will be looked at as a way to do this*. @rniwa mentioned there have been discussions about a declarative syntax for defining custom elements and attaching a Shadow DOM. Has there been any discussion, or is any work being done, on a declarative syntax that would allow us to achieve "client-side includes" without running JavaScript? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/636#issuecomment-294864413
Received on Tuesday, 18 April 2017 14:36:12 UTC