
  <my-element id="test">Test</my-element>
  <template id="myTemplate">
    <slot></slot>
    <p id="target">This text will be styled.</p>
    <style>
    p {
      color: rgb(0 255 0);
    }
    slot:not(:has-slotted) + p {
      color: rgb(0 0 255);
    }
    </style>
  </template>

  <script>
    customElements.define('my-element', class extends HTMLElement {
      constructor() {
        super();
        this.attachShadow({
          mode: 'open',
          slotAssignment: 'manual',
        });
        