Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
6e0300c5
...
6e0300c5cb8b3bd554a8610de8e12209ae69c4b1
authored
2012-07-26 08:29:10 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added ClientUtils.getDocumentHeight()
1 parent
32deac70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
modules/clientutils.js
modules/clientutils.js
View file @
6e0300c
...
...
@@ -335,6 +335,20 @@
};
/**
* Retrieves total document height.
* http://james.padolsey.com/javascript/get-document-height-cross-browser/
*
* @return {Number}
*/
this
.
getDocumentHeight
=
function
getDocumentHeight
()
{
return
Math
.
max
(
Math
.
max
(
document
.
body
.
scrollHeight
,
document
.
documentElement
.
scrollHeight
),
Math
.
max
(
document
.
body
.
offsetHeight
,
document
.
documentElement
.
offsetHeight
),
Math
.
max
(
document
.
body
.
clientHeight
,
document
.
documentElement
.
clientHeight
)
);
};
/**
* Retrieves bounding rect coordinates of the HTML element matching the
* provided CSS3 selector
*
...
...
Please
register
or
sign in
to post a comment