Type of Change
Summary
Initially started in ProjectEvergreen/greenwood#548, but wcc may provide a nice sandbox for something testing something like this out.
Latest prototype looks something like this
// https://web.dev/declarative-shadow-dom/#hydration
class HydrateElement extends HTMLElement {
// attach the shadow
connectedCallback() {
if (!this.shadowRoot) {
this.attachShadow({ mode: 'open' });
this.shadowRoot.appendChild(template.content.cloneNode(true));
}
}
}
/*
<style>
x-foo:not(:defined) > * {
display: none;
}
</style>
*/
export { HydrateElement };
Details
Some other ideas / feature that have come up while working on wcc that are worth tracking as part of this
Type of Change
Summary
Initially started in ProjectEvergreen/greenwood#548, but wcc may provide a nice sandbox for something testing something like this out.
Latest prototype looks something like this
Details
Some other ideas / feature that have come up while working on wcc that are worth tracking as part of this
render(orhydrate?) methodscustomElements.definehandling / proxyingif(this.shadowRoot)<Header/><wcc-header/>/renderToString(<Page/>)