Bug/Question: LitElement rendering into multiple iframes no styles with constructable stylesheets #1139
Closed
Description
opened on Jan 22, 2021
I'm rendering a component into multiple iframes
render(html`<foo-el></foo-el>`, iframe1.contentDocument.body);
render(html`<foo-el></foo-el>`, iframe2.contentDocument.body);
and I'm already amazed that I don't need to redefine all custom elements in those iframes...
however due to LitElement using constructable stylesheets... those stylesheets are only available in the "parent" window...
any way I can bring them along?
funny enough it works fine in browser that don't support constructable stylesheets as then it will create style tags in the shadow dom 😅
===> Live Demo at https://codepen.io/daKmoR/pen/XWjwdRb?editors=1000 <<===
Question
is that the intended behaviour? or should it register the stylesheet in every document it get's added 🤔
Activity