parasol
Handy helpers for the Shadow DOM.
Installation
npm install --save parasol
Usage
Given this DOM structure...
<my-parent> (Light DOM)
(Shadow Root)
... (Shadow DOM)
<my-child> (Shadow DOM)
closest(selectors)
Like Element.closest but breaks out of the Shadow root boundary.
myChild:: // <my-parent>
host()
Like ShadowRoot.host but works its way up the Shadow DOM until it finds the host
.
myChild:: // <my-parent>
Development
Run tests
npm test