Closed manolakis closed 3 years ago
I put it on codepen for lazy people like me https://codepen.io/daKmoR/pen/rNjErgx
Here is another but that might be related: https://github.com/webcomponents/polyfills/issues/443
It looks like it is upgrading, we're just failing to call connectedCallback
for an element that is already parsed and in "pending upgrade" state and then is defined later.
Thanks!
Any chance to get a new release of @webcomponents/scoped-custom-element-registry
? There have been a bunch of nice fixes/improvements recently :)
Description
if we do a lazy component definition over a scoped registry using a tag name previously defined in the global registry, the components are not upgraded.
@kevinpschaaf
Example
See https://github.com/lazka/scoped-test-v2/blob/main/demo.js for a minimal example.
The
SomethingDifferent
component isn't visible if it is registered globally first and defineScopedElement() is called after the first update.Two things:
Removing the first
customElements.define
fixes things Callingthis.defineScopedElement
earlier (before render) fixes things as wellSteps to reproduce
build the previous example and open the HTML inside the dist folder.
Expected behavior
It should upgrade the component
Actual behavior
The component is not upgraded
Version
scoped-custom-element-registry v0.0.1