webcomponents / polyfills

Web Components Polyfills
BSD 3-Clause "New" or "Revised" License
1.13k stars 166 forks source link

[scoped-custom-element-registry] Run `connectedCallback` on upgraded elements #446

Closed kevinpschaaf closed 3 years ago

kevinpschaaf commented 3 years ago

In the "upgrade" case (when an element is registered and there are elements in the _awaitingUpgrade map for that tag name), we were failing to run connectedCallback(). If the stand-in element definition was defined in the global registry first, then we would have no-opted the initial connectedCallback(), and so when manually upgrading the element later, we need to be sure to run its connectedCallback if isConnected === true.

Fixes #442