Would definitely to call this out as experimental and very much an interpretation of the specification, and should probably start a discussion to track those future facing implementations for when they land / co-alece at the standards level.
Would be nice to see if this could be used in conjunction with #955 to achieve something like this?
import fragment from './html?type=html';
export default class PageLayout extends HTMLElement {
async connectedCallback() {
this.innerHTML = fragment.innerHTML;
}
}
Might also want to revisit our html-includes plugin and deprecate the the Custom Element flavor since I think this was all conceived before SSR and WCC? 🤔
Summary
Coming out of the work done in #923, it would be nice to have some form of support for HTML Modules (at least our interpretation of it). Ex:
As a super duper bonus would be great to also get some sort of DOM Parts / templating API in there too (which might require WCC support)
And use it like this
Details
Would definitely to call this out as experimental and very much an interpretation of the specification, and should probably start a discussion to track those future facing implementations for when they land / co-alece at the standards level.
Would be nice to see if this could be used in conjunction with #955 to achieve something like this?
Might also want to revisit our html-includes plugin and deprecate the the Custom Element flavor since I think this was all conceived before SSR and WCC? 🤔