Check SharedArrayBuffer support in outer

pull/1/head
yflory 3 years ago
parent 8846b2d10e
commit ab62b5f202

@ -616,6 +616,10 @@
getColor().toString(16);
};
Util.supportsWasm = function () {
return !(typeof(Atomics) === "undefined" || typeof (SharedArrayBuffer) === "undefined" || typeof(WebAssembly) === 'undefined');
};
if (typeof(module) !== 'undefined' && module.exports) {
module.exports = Util;
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {

@ -138,6 +138,10 @@ define([
var startOO = function () {};
var supportsXLSX = function () {
return privateData.supportsWasm;
};
var getMediasSources = APP.getMediasSources = function() {
content.mediasSources = content.mediasSources || {};
return content.mediasSources;

@ -638,7 +638,8 @@ define([
title: Cryptpad.fromFileData.title
} : undefined,
burnAfterReading: burnAfterReading,
storeInTeam: Cryptpad.initialTeam || (Cryptpad.initialPath ? -1 : undefined)
storeInTeam: Cryptpad.initialTeam || (Cryptpad.initialPath ? -1 : undefined),
supportsWasm: Utils.Util.supportsWasm()
};
if (window.CryptPad_newSharedFolder) {
additionalPriv.newSharedFolder = window.CryptPad_newSharedFolder;

Loading…
Cancel
Save