title: Uncaught DOMException: Failed to set the 'adoptedStyleSheets' property on 'ShadowRoot': Can't adopt non-constructed stylesheets
body: <p>Hot to use style element in shadowRoot.adoptedStyleSheets?</p>
  <pre class="lang-html prettyprint-override"><code>&lt;style id=style&gt;
    h1 { color: red }
  &lt;/style&gt;
  &lt;script&gt;
    customElements.define('test-elem', class extends HTMLElement {
      constructor () {
        super()
        const shadow = this.attachShadow({ mode: 'closed' })
        shadow.adoptedStyleSheets = [style.sheet]
        shadow.append(template.content.cloneNode(true))
      }
    })
  &lt;/script&gt;
  </code></pre>