mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
12 lines
326 B
JavaScript
12 lines
326 B
JavaScript
class CustomContainer extends HTMLElement {
|
|
constructor() {
|
|
super();
|
|
|
|
if (!this.shadowRoot) {
|
|
const shadow = this.attachShadow({ mode: 'open' });
|
|
shadow.innerHTML = 'Hello custom container<slot></slot>';
|
|
}
|
|
}
|
|
}
|
|
customElements.define('custom-container', CustomContainer);
|