- From: christopher luna <notifications@github.com>
- Date: Sun, 19 Jul 2015 02:02:25 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
Received on Sunday, 19 July 2015 09:02:55 UTC
@techtonik Well, since this seemed like an interesting idea, I decided to create a web component that implement this: [html-include](https://github.com/chris-l/html-include). And you can use it the way you wanted - inside body: ```html <html-include src="header.html"></html-include> ``` That will load the `header.html` file with a `XMLHttpRequest` and replace itself with the raw content. It will stop the propagation of the normal `DOMContentLoaded` event, and once all the `html-include` elements are resolved, it will then manually emit a `DOMContentLoaded` event, so the listeners it could have see the fully composed DOM. --- Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/280#issuecomment-122640961
Received on Sunday, 19 July 2015 09:02:55 UTC