fix 1:1 demo to work with Olm.init()

This commit is contained in:
Matthew Hodgson 2020-05-16 17:10:32 +01:00
parent fdf25eb3ba
commit 14c1db02fe

View file

@ -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>