aboutsummaryrefslogtreecommitdiffstats
path: root/src/dimensions.js
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-09-22 16:41:51 -0400
committerjeresig <jeresig@gmail.com>2010-09-22 16:41:51 -0400
commitc8dd49f756562fef68f664869952e4f5aab08acd (patch)
tree171989c57a01f0c84c7d0486645ac434a8d92472 /src/dimensions.js
parentab454d9526445fa025b9c897ec2b21aa89babc8d (diff)
downloadjquery-c8dd49f756562fef68f664869952e4f5aab08acd.tar.gz
jquery-c8dd49f756562fef68f664869952e4f5aab08acd.zip
Unify the means of detecting a window across the library. Fixes jQuery UI bug #5438 and jQuery bugs #6575 and 6088.
Diffstat (limited to 'src/dimensions.js')
-rw-r--r--src/dimensions.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dimensions.js b/src/dimensions.js
index 7ca33794c..5aafbf41e 100644
--- a/src/dimensions.js
+++ b/src/dimensions.js
@@ -33,7 +33,7 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
});
}
- return ("scrollTo" in elem && elem.document) ? // does it walk and quack like a window?
+ return jQuery.isWindow( elem ) ?
// Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
elem.document.body[ "client" + name ] :