Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2025-02-06 15:51:23 +03:00
parent 0d0fbadc2f
commit 2c2257b603

View File

@ -4,6 +4,7 @@
*
**********************************************************************/
// XXX add something like .closeToViewport(..)
Element.prototype.visibleInViewport = function(partial=false){
var { top, left, bottom, right } = this.getBoundingClientRect()
var { innerHeight, innerWidth } = window