Accessing a custom element in both shadow and light DOM #4275
Replies: 1 comment
-
Closing the poll, with See also: #4259 |
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
-
#4219 proposes adding a new property on
LightningElement
that allows programmatic access to the underlyingHTMLElement
.Currently you can do this with:
this.template.host
in shadow DOMthis.firstChild.parentNode
in light DOMHowever, it's cumbersome to have two conventions for doing the same thing. So let's create a new property that does both:
this.foo
– works in both shadow and light DOMWhat should we name
foo
? Vote in the poll!16 votes ·
Beta Was this translation helpful? Give feedback.
All reactions