Socket
Socket
Sign inDemoInstall

node.parentelement

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node.parentelement

A spec-compliant cross-browser polyfill for Node.parentElement


Version published
Weekly downloads
44
increased by4.76%
Maintainers
1
Install size
4.60 kB
Created
Weekly downloads
 

Readme

Source

Node.parentElement polyfill

A spec-compliant polyfill for Node.parentElement. It adds support for it in IE <8.

It also normalizes the behavior between different browsers. Some, like Internet Explorer >=9 and Opera <=12 have implemented the method only on Elements while others have implemented it on all Nodes. Node is undefined in IE8. This polyfill makes sure that it always works on all types that implements Node such as Attr and Text.

Install

Install with

npm install node.parentelement --save-dev

Usage

Load it in your code with an import statement:

import "node.parentelement";

Or from a script tag:

<script src="../node_modules/node.parentelement/polyfill.min.js"></script>

The polyfill will be applied automatically if necessary.

FAQs

Last updated on 31 Oct 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc