diff options
author | timmywil <timmywillisn@gmail.com> | 2011-11-01 12:02:22 -0400 |
---|---|---|
committer | timmywil <timmywillisn@gmail.com> | 2011-11-01 12:02:22 -0400 |
commit | 969fcc16bc5ab77352407f77cd48860ca4d95434 (patch) | |
tree | 440cb0f513dc6ba107f190a50ebf5b54cc253943 | |
parent | 52afe20860c4082165b7a9f2184fa1851f7e3fb0 (diff) | |
download | jquery-969fcc16bc5ab77352407f77cd48860ca4d95434.tar.gz jquery-969fcc16bc5ab77352407f77cd48860ca4d95434.zip |
Add return in the offset support tests if the body is not present in frameset docs
-rw-r--r-- | src/support.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/support.js b/src/support.js index 1920e5b87..436809404 100644 --- a/src/support.js +++ b/src/support.js @@ -266,6 +266,12 @@ jQuery.support = (function() { // Reconstruct a container body = document.getElementsByTagName("body")[0]; + if ( !body ) { + // Return for frameset docs that don't have a body + // These tests cannot be done + return; + } + container = document.createElement("div"); container.style.cssText = vb + "width:0;height:0;position:static;top:0;marginTop:" + conMarginTop + "px"; body.insertBefore( container, body.firstChild ); |