]> source.dussan.org Git - jquery.git/commitdiff
Add return in the offset support tests if the body is not present in frameset docs
authortimmywil <timmywillisn@gmail.com>
Tue, 1 Nov 2011 16:02:22 +0000 (12:02 -0400)
committertimmywil <timmywillisn@gmail.com>
Tue, 1 Nov 2011 16:02:22 +0000 (12:02 -0400)
src/support.js

index 1920e5b87eb8f806dbce03dae66cf0cdc8e31bbf..4368094042789d621ee3d3d0f01266c00ad6d3f9 100644 (file)
@@ -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 );