Web Components, Shadow Dom, Web Standards, CSS, HTML.
if (styles) { root.adoptedStyleSheets.push(styles); } else { styles = new CSSStyleSheet(); const element = root.getElementById(id); styles.replaceSync(element.innerHTML); lookup.set(id, styles); } this.remove(); } } customElements.define("shared-style", SharedStyle); The <shared-style> element will