mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 05:31:03 +00:00
Update chrome.js
This commit is contained in:
parent
9efe02e902
commit
adc7127775
|
@ -994,6 +994,10 @@ var ChromeObject = function() {
|
||||||
return parseInt(this.getEvaluatedValue('window.innerHeight'));
|
return parseInt(this.getEvaluatedValue('window.innerHeight'));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.getDocumentScrollTop = function() {
|
||||||
|
return parseInt(this.getEvaluatedValue('document.documentElement.scrollTop'));
|
||||||
|
};
|
||||||
|
|
||||||
// formula: y > 0 and y + h < ih
|
// formula: y > 0 and y + h < ih
|
||||||
this.isVisibleElementInViewport = function(elementPosition) {
|
this.isVisibleElementInViewport = function(elementPosition) {
|
||||||
return (elementPosition.y > 0 && (elementPosition.y + elementPosition.h < this.getWindowInnerHeight()));
|
return (elementPosition.y > 0 && (elementPosition.y + elementPosition.h < this.getWindowInnerHeight()));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user