# get-root-node-polyfill

> Polyfill for the new Node method getRootNode

Latest version **1.0.0** (published 2018-02-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-root-node-polyfill
pnpm add get-root-node-polyfill
yarn add get-root-node-polyfill
bun add get-root-node-polyfill
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-02-16 |
| First published | 2016-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Guylian Cox |
| Maintainers | ephys |
| Keywords | DOM, DOM4, Polyfill, getRootNode, rootNode, Node |

## Links

- npm: https://www.npmjs.com/package/get-root-node-polyfill
- Repository: https://github.com/foobarhq/get-root-node-polyfill
- Homepage: https://github.com/foobarhq/get-root-node-polyfill#readme
- Issues: https://github.com/foobarhq/get-root-node-polyfill/issues
- npm.io page: https://npm.io/package/get-root-node-polyfill

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2018-02-16
- 0.0.1 — 2016-09-28

## README

# `Node.prototype.getRootNode` polyfill

Polyfill for the new DOM method `Node.prototype.getRootNode` as defined 
by the [DOM specification](https://dom.spec.whatwg.org/#dom-node-getrootnode)

## Install

`npm install --save get-root-node-polyfill`

## Usage

```javascript
// Implement the method if it does not already exist:
require('get-root-node-polyfill/implement');
aDiv.getRootNode({ composed: false }); // options are optional, defaults to composed = false.

// Get the method without touching Node.prototype
const getRootNode = require('get-root-node-polyfill');
getRootNode.call(aDiv, { composed: false });

// Check if the method is available on Node.prototype.
const isImplemented = require('get-root-node-polyfill/is-implemented');
isImplemented(); // true if the method is available
```

---
_Source: https://npm.io/package/get-root-node-polyfill · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
