mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
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
@ -37,6 +37,11 @@ function addScript(src) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function loadOlm(olmPaths) {
|
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 (olmPaths) {
|
||||||
if (window.WebAssembly) {
|
if (window.WebAssembly) {
|
||||||
await addScript(olmPaths.wasmBundle);
|
await addScript(olmPaths.wasmBundle);
|
||||||
|
Loading…
Reference in New Issue
Block a user