feature: element.getShadow(opts)
#1046
Labels
addition/proposal
New features or enhancements
needs implementer interest
Moving the issue forward requires implementers to express interest
topic: shadow
Relates to shadow trees (as defined in DOM)
This would be an alternative to
element.attachShadow(opts)
. It would be similar tocanvas.getContext
in that if a root is not already created/attached, it will create/attach the root before returning the root. If a root is already created, the existing root will be returned. This would make it easier to write code like this:without having to write extra code to handle whether or not a root already exists.
On a related note, maybe a similar utility would be nice for
ElementInternals
?The text was updated successfully, but these errors were encountered: