manolakis / scoped-registries

Scoped Custom Element Registry Polyfill
4 stars 2 forks source link

Polyfill breaks with LitHtml #11

Closed guillemcordoba closed 3 years ago

guillemcordoba commented 3 years ago

When defining elements with lit-element or rendering in the dom via lit-html, the browser gets stuck. I've tried to figure out if this was an infinite loop with the polyfill conflicting with some lit function but without luck.

Reproduction repo: https://github.com/guillemcordoba/scoped-registries

manolakis commented 3 years ago

Hello @guillemcordoba,

Thanks for the issue. I saw the code in your fork and there is a small mistake. You must rename createShadowRoot into createRenderRoot. With that change I saw that the demo is working on firefox and Safari, but Chrome is already failing... 🤔

I'm going to dig more deeply on it to try to see what's happening.

manolakis commented 3 years ago

Here you have the updated code that works also with Chrome 🤗

https://github.com/manolakis/scoped-registries/tree/lit-element-demo

guillemcordoba commented 3 years ago

Awesome! Thank you very much, amazing response.