bounding-client-rect
Version:
Cross-browser `getBoundingClientRect()` for all Node types
22 lines (15 loc) • 803 B
Markdown
bounding-client-rect
====================
### Cross-browser `getBoundingClientRect()` for all Node types
[](https://saucelabs.com/u/bounding-client-rect)
[](https://travis-ci.org/webmodules/bounding-client-rect)
[`getBoundingClientRect()`](https://developer.mozilla.org/en-US/docs/Web/API/Element.getBoundingClientRect)
that works on DOM
[`Elements`](https://developer.mozilla.org/en-US/docs/Web/API/Element),
[`Ranges`](https://developer.mozilla.org/en-US/docs/Web/API/Range), and
[`TextNodes`](https://developer.mozilla.org/en-US/docs/Web/API/Text).
Installation
------------
``` bash
$ npm install bounding-client-rect
```