Fix issue with FF3.5 and below not having readyState

Review at http://gwt-code-reviews.appspot.com/1087801

Review by: jgw@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@9196 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js b/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
index 3abdcb7..c0674b6 100644
--- a/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
+++ b/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
@@ -1,8 +1,3 @@
-// Check whether the body is loaded.
-function isBodyLoaded() {
-  return true;
-}
-
 // Setup code which waits for the body to be loaded and then calls the
 // callback function
 function setupWaitForBodyLoad(callback) {
diff --git a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
index fe7c0dc..d776b54 100644
--- a/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
+++ b/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
@@ -23,6 +23,12 @@
    ***************************************************************************/
 
   function isBodyLoaded() {
+    if (typeof $doc.readyState == "undefined") {
+      // FF 3.5 and below does not have readyState, but it does allow us to
+      // append to the body before it has finished loading, so we return whether
+      // the body element exists.
+      return (typeof $doc.body != "undefined");
+    }
     return (/loaded|complete/.test($doc.readyState));
   }