JS"> class HelloWorld extends HTMLElement { connectedCallback() { const shadow = this.attachShadow({ mode: 'closed' }); // このコンポーネント専用のCSSが書ける shadow.innerHTML = /* html */ ` <style> span { text-align: center; } </style> <span>Hello ${ this.name }!</span>`; } } defineComponent('hello-world', HelloWorld)