1.0.2 • Published 9 years ago
node.parentelement v1.0.2
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-devUsage
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.