mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-15 06:01:04 +00:00
Update chrome.js
This commit is contained in:
parent
15a6be1ec1
commit
410d77ccdd
|
@ -931,6 +931,11 @@ var ChromeObject = function() {
|
||||||
return this.getEvaluatedValue('window.innerHeight');
|
return this.getEvaluatedValue('window.innerHeight');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// formula: y > 0 and y + h < ih
|
||||||
|
this.isVisibleElementInViewport = function(elementPosition) {
|
||||||
|
return (elementPosition.y > 0 && (elementPosition.y + elementPosition.h < this.getWindowInnerHeight());
|
||||||
|
};
|
||||||
|
|
||||||
this.create();
|
this.create();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user