manolakis / scoped-registries

Scoped Custom Element Registry Polyfill
4 stars 2 forks source link

LitHtml properties not being passed down to the element #14

Closed guillemcordoba closed 3 years ago

guillemcordoba commented 3 years ago

Just trying LitElement with the new bugfix, I'm getting the element renderer successfully. Although, properties don't seem to be passing down elements rendered like this inside shadow roots with a ScopedCustomElementsRegistry:

render(html`<my-el .prop=${"test"}></my-el>`, element1.shadowRoot)

Prop is undefined in the MyEl class.

Reproduction here: https://github.com/guillemcordoba/scoped-registries/issues/new

manolakis commented 3 years ago

Hi @guillemcordoba,

Thanks for the issue! I found that I was not propagating the component properties, so that's why it was failing.

I just pushed a fix so if you rebase from master it should work now.

Thanks!

guillemcordoba commented 3 years ago

You are simply awesome. Thanks for unblocking this! This is a very important piece of the puzzle of a very exciting project for me. Will keep in touch if I have any more problems.

manolakis commented 3 years ago

Glad to help.

Please, note that this polifyll is just a PoC. There is another one in development which is very interesting that hopefully would be released soon https://github.com/webcomponents/polyfills/pull/383. Take a look on it!