<my-ce></my-ce>

<script>
  class MyCe extends HTMLElement {
    constructor() {
      super()
      this._name = 'Default Name'
    }

    get name() {
      return this._name
    }

    set name(value) {
      this._name = value
    }
  }
  customElements.define('my-ce', MyCe)
</script>

Done 🎉

Now you can set name with myCe.name = 'New Name' and get it with console.log(myCe.name).