Add component as argument to state component constructor

This commit is contained in:
Talia 2024-01-10 13:28:56 +01:00
parent f6b82e22ef
commit b51732636d
1 changed files with 1 additions and 1 deletions

View File

@ -269,7 +269,7 @@ export const component = (generator, name) => {
}
})
attributeObserver.observe(this, {attributes: true})
this.replaceChildren(generator(this.state))
this.replaceChildren(generator(this.state, this))
}
}
customElements.define(name, Element)