connectedCallback is called every time, when an element is attached to document, so also when you move an element from one parent to another. MDN definition:
connectedCallback: Invoked each time the custom element is appended into a document-connected element. This will happen each time the node is moved, and may happen before the element's contents have been fully parsed.
connectedCallback
is called every time, when an element is attached to document, so also when you move an element from one parent to another. MDN definition:(developer.mozilla.org/en-US/docs/W...)