Nachricht für neue Nutzer.
Nachricht für engagierte Nutzer.
Widget:KnowHowComputer: Unterschied zwischen den Versionen
Aus ZUM-Unterrichten
KKeine Bearbeitungszusammenfassung |
KKeine Bearbeitungszusammenfassung |
||
| Zeile 2: | Zeile 2: | ||
(function () { | (function () { | ||
const STYLESHEET_HREFS = Array.from(document.styleSheets).filter(cssss => cssss.href).map(cssss => cssss.href); | |||
if (!customElements.get('know-how-computer')) { | if (!customElements.get('know-how-computer')) { | ||
| Zeile 210: | Zeile 211: | ||
</aside> | </aside> | ||
</div>`; | </div>`; | ||
STYLESHEET_HREFS.map(function (href) { | |||
const styleElem = document.createElement("link"); | |||
styleElem.setAttribute("href", href); | |||
styleElem.setAttribute("rel", "stylesheet"); | |||
return styleElem; | |||
}).forEach(linkElem => this.shadowRoot.prepend(linkElem)); | |||
// Create the KnowHowComputer instance | // Create the KnowHowComputer instance | ||
this.khc = new KnowHowComputer(this.shadowRoot); | this.khc = new KnowHowComputer(this.shadowRoot); | ||
