add note about telling olm how to find wasm file

This commit is contained in:
Hubert Chathi 2021-11-11 14:05:07 -05:00
parent bce4f007b1
commit 06b723db6e

View file

@ -5,6 +5,11 @@ Note: before using any of the olm functions, you must call `Olm.init()`, and
wait for the promise to resolve, otherwise you will get errors like:
`Uncaught TypeError: Olm.Account is not a constructor`
If you get errors about failure to compile the wasm file, it is likely that Olm
is not locating the wasm file properly. You can tell Olm where the wasm file
is by passing a `locateFile` parameter to `Olm.init()`, for example:
`Olm.init({locateFile: () => pathToWasmFile})`.
Example:
var alice = new Olm.Account();