import { LitElement, html } from "lit"; import { customElement } from "lit/decorators.js"; @customElement("main-layout") export class MainLayout extends LitElement { private _initialChildren: Node[] = []; createRenderRoot() { return this; } connectedCallback() { if (this._initialChildren.length === 0 && this.childNodes.length > 0) { this._initialChildren = Array.from(this.childNodes); } super.connectedCallback(); } render() { return html`
${this._initialChildren}
`; } }