Socket
Book a DemoInstallSign in
Socket

parasol

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parasol

Handy helpers for the Shadow DOM.

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

parasol

Handy helpers for the Shadow DOM.

Codeship 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

Keywords

event

FAQs

Package last updated on 27 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts