shadow
Using the shadow property, you can obtain the shadow root instance of an element.
- item 1
- item 2
- item 3
Note that you should avoid directly modifying elements inside the shadow DOM of elements with template syntax to ensure consistency and maintainability.
Obtaining an element instance inside a component's shadow DOM from outside
You can also obtain a custom element instance from outside and then access elements inside the shadow DOM via the shadow property, as shown below:
$("test-shadow").shadow.$('selector').method(xxx);
- item 1
- item 2
- item 3