element-from-absolute-point
v0.0.4
Published
Support for finding elements using absolute `X`/`Y` coordinates of the page, especially when elements are not currently visible on the page.
Downloads
5
Maintainers
Readme
JavaScript document.elementFromAbsolutePoint()
This little library adds support for finding elements using absolute X
/Y
coordinates of the page, especially when elements are not currently visible on the page.
The native document.elementFromPoint()
only will return elements relative to the current visible viewport and return null
if the element is outside of the current visible viewport.
Further reading
Installation
bower install --save element-from-absolute-point
Usage
Use as you would with document.elementFromPoint
.
var element = document.elementFromAbsolutePoint(1000000, 1000000);
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
This library is distributed under the MIT license. Please see the LICENSE file.