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