You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't currently documented because we might want to change how this works. It might be easier to just automatically render into shadowDOM if attachShadow was called and not have a special viewRoot property. Although maybe there will be use-cases for rendering somewhere else, so viewRoot might be useful.
The text was updated successfully, but these errors were encountered:
I think viewRoot is a bit more flexible than checking for a .shadowRoot property. It's explicit and will work with closed shadow roots as well. If a shadow exists then there's probably no point of rendering a template into the light DOM. At least I've never heard of anyone doing that. Keeping viewRoot gives you flexibility here. You could render a template into the shadow (manually) and have the framework render it into the element light DOM. Weird but possible.
You currently can render into
shadowDOM
by setting theviewRoot
property:https://github.com/canjs/can-stache-define-element/blob/75be0f9c937459f6eba13bcf21a09ec7999c26e4/src/mixin-stache-view-test.js#L44
This isn't currently documented because we might want to change how this works. It might be easier to just automatically render into shadowDOM if
attachShadow
was called and not have a specialviewRoot
property. Although maybe there will be use-cases for rendering somewhere else, soviewRoot
might be useful.The text was updated successfully, but these errors were encountered: