diff options
author | Matthew Hodgson <matthew@matrix.org> | 2020-05-16 17:10:32 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2020-05-16 17:10:32 +0100 |
commit | 14c1db02fe8a5730c840949b2639ccfa99fe84a6 (patch) | |
tree | 2820db696481c754cfda398e4884bf1613cfc29c /javascript/demo/one_to_one_demo.html | |
parent | fdf25eb3ba31d4c57d50f70a1dacae6fc1c00959 (diff) |
fix 1:1 demo to work with Olm.init()
Diffstat (limited to 'javascript/demo/one_to_one_demo.html')
-rw-r--r-- | javascript/demo/one_to_one_demo.html | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/javascript/demo/one_to_one_demo.html b/javascript/demo/one_to_one_demo.html index fc7e654..a225e4a 100644 --- a/javascript/demo/one_to_one_demo.html +++ b/javascript/demo/one_to_one_demo.html @@ -2,7 +2,13 @@ <head> <script src="../olm.js"></script> <script> -document.addEventListener("DOMContentLoaded", function (event) { +document.addEventListener("DOMContentLoaded", function() { + Olm.init().then(function() { + demo(); + }); +}, false); + +function demo() { function progress(who, message) { var message_element = document.createElement("pre"); var progress = document.getElementById(who + "_progress"); @@ -109,7 +115,7 @@ document.addEventListener("DOMContentLoaded", function (event) { glue_encrypt("bob", "alice", b_session); glue_decrypt("alice", a_session); }); - }, false); +} </script> <body> |