From 969fcc16bc5ab77352407f77cd48860ca4d95434 Mon Sep 17 00:00:00 2001 From: timmywil Date: Tue, 1 Nov 2011 12:02:22 -0400 Subject: Add return in the offset support tests if the body is not present in frameset docs --- src/support.js | 6 ++++++ 1 file changed, 6 insertions(+) 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 ); -- cgit v1.2.3