projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a57586
)
document unload promise resolving correctly with promise shim
author
Darren
<darren@darrenwhitlen.com>
Wed, 22 Oct 2014 19:19:52 +0000
(20:19 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Wed, 22 Oct 2014 19:19:52 +0000
(20:19 +0100)
client/src/index.html.tmpl
patch
|
blob
|
blame
|
history
diff --git
a/client/src/index.html.tmpl
b/client/src/index.html.tmpl
index 71c1d00cb3ae15e44a052865350e21e70e067768..a47084c8cfa0b78c4ba80cba69957a66a0ec0b3d 100644
(file)
--- a/
client/src/index.html.tmpl
+++ b/
client/src/index.html.tmpl
@@
-471,6
+471,12
@@
}
\r
\r
onload_promise = new Promise(function (resolve) {
\r
+ // Document may already be loaded if we had to load the Promise shim seperately
\r
+ if (document.readyState === 'complete') {
\r
+ resolve();
\r
+ return;
\r
+ }
\r
+
\r
window.onload = resolve;
\r
});
\r
\r