mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Switching to use a better check for if the node is a document.
This commit is contained in:
parent
d828ff75a4
commit
9d46c0ebb4
@ -27,7 +27,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){
|
||||
elem.document.body[ "client" + name ] :
|
||||
|
||||
// Get document width or height
|
||||
(elem.nodeName === "#document") ? // is it a document
|
||||
(elem.nodeType === 9) ? // is it a document
|
||||
// Either scroll[Width/Height] or offset[Width/Height], whichever is greater
|
||||
Math.max(
|
||||
elem.documentElement["client" + name],
|
||||
|
Loading…
Reference in New Issue
Block a user