Skip to content

migme/parasol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parasol

Handy helpers for the Shadow DOM.

Codeship Dependency Status npm npm

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.

import { closest } from 'parasol'
myChild::closest('my-parent') // <my-parent>

host()

Like ShadowRoot.host but works its way up the Shadow DOM until it finds the host.

import { host } from 'parasol'
myChild::host() // <my-parent>

Development

Run tests

npm test

See Also

About

🌂 Handy helpers for the Shadow DOM.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published