summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-11 16:13:21 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-10-11 16:13:21 +0200
commit36098d5d2d54cd4aff6b6071ea21e231c2132f94 (patch)
tree4f171a4ce747336cd96af9bdf0aa74a9cc567052
parent4aed56146a0917b03cdc595e9ca49c334222ecfe (diff)
downloadweb-common-36098d5d2d54cd4aff6b6071ea21e231c2132f94.tar.gz
web-common-36098d5d2d54cd4aff6b6071ea21e231c2132f94.tar.bz2
web-common-36098d5d2d54cd4aff6b6071ea21e231c2132f94.zip
only add event listeners to avoid conflicts in Firefox
-rw-r--r--taler-wallet-lib.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/taler-wallet-lib.ts b/taler-wallet-lib.ts
index ce77342..a31c0f4 100644
--- a/taler-wallet-lib.ts
+++ b/taler-wallet-lib.ts
@@ -411,11 +411,11 @@ namespace taler {
if (document.readyState == "complete") {
initStyle();
} else {
- window.onload = () => {
+ let listener = () => {
initStyle();
setStyles();
};
- }
+ window.addEventListener("load", listener);
// We only start the timeout after the page is interactive.
window.setInterval(onProbeTimeout, 300);
@@ -456,7 +456,7 @@ namespace taler {
runningInExtension = true;
// Wait for even style sheets to load
if (document.readyState != "complete") {
- window.onload = () => onPageLoadInExtension();
+ window.addEventListener("load", () => onPageLoadInExtension());
} else {
onPageLoadInExtension();
}