mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-11 09:24:58 +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'));
|
||||
};
|
||||
|
||||
this.getDocumentScrollTop = function() {
|
||||
return parseInt(this.getEvaluatedValue('document.documentElement.scrollTop'));
|
||||
};
|
||||
|
||||
// formula: y > 0 and y + h < ih
|
||||
this.isVisibleElementInViewport = function(elementPosition) {
|
||||
return (elementPosition.y > 0 && (elementPosition.y + elementPosition.h < this.getWindowInnerHeight()));
|
||||
|
|
Loading…
Reference in New Issue
Block a user