Move DOM manipulation from constructors to connectedCallback #1 #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Even though all the workshop code work well, I learned that technically DOM manipulation should not happen in the web component
constructor() {}
but rather as part of theconnectedCallback()
call. See: https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformanceShout out to @andlbrei for researching this. 🙌