Index: composer.postload.js |
=================================================================== |
--- a/composer.postload.js |
+++ b/composer.postload.js |
@@ -577,10 +577,24 @@ |
} |
}); |
} |
break; |
} |
}); |
if (window == window.top) |
- ext.backgroundPage.sendMessage({type: "composer.ready"}); |
+ { |
+ if (document.visibilityState == "prerender") |
+ { |
+ document.addEventListener("visibilitychange", function onVisibilitychange() |
kzar
2017/05/19 12:33:05
Nit: Long line.
Also it's kind of unusual how you
Manish Jethani
2017/05/19 23:58:48
Sure, I wasn't sure what the preferred style was.
|
+ { |
+ document.removeEventListener("visibilitychange", onVisibilitychange); |
+ |
+ ext.backgroundPage.sendMessage({type: "composer.ready"}); |
+ }); |
+ } |
+ else |
+ { |
+ ext.backgroundPage.sendMessage({type: "composer.ready"}); |
+ } |
+ } |
} |