Revision: 9196
Author: [email protected]
Date: Mon Nov  8 06:24:23 2010
Log: Fix issue with FF3.5 and below not having readyState

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

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=9196

Modified:
/trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
 /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js

=======================================
--- /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js Tue Oct 12 16:00:43 2010 +++ /trunk/dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js Mon Nov 8 06:24:23 2010
@@ -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) {
=======================================
--- /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js Wed Oct 27 13:37:45 2010 +++ /trunk/dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js Mon Nov 8 06:24:23 2010
@@ -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));
   }

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to