Commit Graph

6 Commits (master)

Author SHA1 Message Date
Hubert Chathi f16377822f Add LibreJS license tag 2021-03-31 16:11:41 -04:00
Lukas Lihotzki 6611165bff do not pollute the global object 2020-10-03 03:46:15 +02:00
David Baker 602c00a8d6 Dual-build wasm and asm.js olm 2018-10-04 20:09:54 +01:00
David Baker c4a3918686 Support passing olm options into init() 2018-09-26 16:38:39 +01:00
David Baker dfbe8a4796 Return same promise if init() called many times
So we only init the library once.
2018-09-25 17:48:17 +01:00
David Baker 263b94428a Another day, another interface
Change the interface again, hopefully this time a bit more normal.
Now we wrap the emscripten module completely and just expose the
high level objects.

The olm library export is now imported as normal (ie. returns
a module rather than a function returning a module) but has an
`init` method which *must* be called. This returns a promise
which resolves when the module is ready. It also rejects if the
module failed to set up, unlike before (and unlike the
promise-not-a-promise that emscripten returns).

Generally catch failures to init the module.
2018-09-25 17:13:29 +01:00