fix: adopted stylesheets (#2785)

This commit is contained in:
Niklas von Hertzen
2022-01-01 01:57:17 +08:00
committed by GitHub
parent 1cc853a318
commit 74696faf47
4 changed files with 57 additions and 15 deletions

View File

@@ -40,6 +40,10 @@ class AutonomousCustomElement extends HTMLElement {
wrapper.appendChild(img);
wrapper.appendChild(info);
}
connectedCallback() {
this.shadowRoot.adoptedStyleSheets = [sheet];
}
}
customElements.define('autonomous-custom-element', AutonomousCustomElement);