Is it possible for a DOM element to live in the light DOM (say, as a child of the body tag) but have it rendered into a LitElement? #4393
andyjessop
started this conversation in
General
Replies: 1 comment
-
You can use slots for this. Render a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to use editor.js, which has an unfortunate attribute of adding things like styles and tooltips into the head and body tags, instead of them living next to (or inside the editor root).
See here for more discussion: codex-team/editor.js#1881
(There is no satisfactory solution over there yet)
I'm wondering if this community has any ideas. All I could think of was that the editor element would live in the light DOM and would, like a Portal in React, be rendered into a shadow root.
Is this feasible, or does anyone have any other ideas?
Beta Was this translation helpful? Give feedback.
All reactions