UNPKG

bounding-client-rect

Version:

Cross-browser `getBoundingClientRect()` for all Node types

22 lines (15 loc) 803 B
bounding-client-rect ==================== ### Cross-browser `getBoundingClientRect()` for all Node types [![Sauce Test Status](https://saucelabs.com/browser-matrix/bounding-client-rect.svg)](https://saucelabs.com/u/bounding-client-rect) [![Build Status](https://travis-ci.org/webmodules/bounding-client-rect.svg?branch=master)](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 ```