Form associated element

<form>
  <my-ce></my-ce>
</form>

<script>
  class MyCe extends HTMLElement {
    static formAssociated = true
  }
  customElements.define('my-ce', MyCe)
</script>

Create basic element.

Create basic custom element as described in Basic recipe.