forked from mystiq/hydrogen-web
make crypto.getRandomValues available on IE11 without a prefix
olm needs this to work on IE11
This commit is contained in:
parent
fe0257bca1
commit
87aabb3057
1 changed files with 5 additions and 0 deletions
|
@ -37,6 +37,11 @@ function addScript(src) {
|
|||
}
|
||||
|
||||
async function loadOlm(olmPaths) {
|
||||
// make crypto.getRandomValues available without
|
||||
// a prefix on IE11, needed by olm to work
|
||||
if (window.msCrypto && !window.crypto) {
|
||||
window.crypto = window.msCrypto;
|
||||
}
|
||||
if (olmPaths) {
|
||||
if (window.WebAssembly) {
|
||||
await addScript(olmPaths.wasmBundle);
|
||||
|
|
Loading…
Reference in a new issue