Reviewers: jgw,
Description:
Fix issue with FF3.5 and below not having readyState
Please review this at http://gwt-code-reviews.appspot.com/1087801/show
Affected files:
M
dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
M dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
Index:
dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
===================================================================
---
dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
(revision 9194)
+++
dev/core/src/com/google/gwt/core/ext/linker/impl/waitForBodyLoadedNull.js
(working copy)
@@ -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) {
Index: dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
===================================================================
--- dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
(revision 9194)
+++ dev/core/src/com/google/gwt/core/linker/CrossSiteIframeTemplate.js
(working copy)
@@ -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