diff options
author | David Baker <dave@matrix.org> | 2018-10-10 20:15:40 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2018-10-10 20:15:40 +0100 |
commit | e73ebcea67b50ada065a362ec774bd66ec47b065 (patch) | |
tree | 7985ce06cb2a30f5b582fcec416c95f725a30dff /javascript/olm_pre.js | |
parent | f6e3f7f44aef5bb84173e87869928bd9922aaf96 (diff) | |
parent | 3cfcf1615dfe434e1aa10d5c904d537b159e1566 (diff) |
Merge remote-tracking branch 'origin/master' into dbkr/pk_private_export_import
Diffstat (limited to 'javascript/olm_pre.js')
-rw-r--r-- | javascript/olm_pre.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/javascript/olm_pre.js b/javascript/olm_pre.js index 4feff97..314d7da 100644 --- a/javascript/olm_pre.js +++ b/javascript/olm_pre.js @@ -37,3 +37,13 @@ if (typeof(OLM_OPTIONS) !== 'undefined') { * use UTF8ToString. */ var NULL_BYTE_PADDING_LENGTH = 1; + +Module['onRuntimeInitialized'] = function() { + OLM_ERROR = Module['_olm_error'](); + olm_exports["PRIVATE_KEY_LENGTH"] = Module['_olm_pk_private_key_length'](); + if (onInitSuccess) onInitSuccess(); +}; + +Module['onAbort'] = function(err) { + if (onInitFail) onInitFail(err); +}; |