diff --git a/www/common/common-util.js b/www/common/common-util.js index 3d2a8d0a4..3419b5160 100644 --- a/www/common/common-util.js +++ b/www/common/common-util.js @@ -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)) { diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 26c5aa947..9e31fa998 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -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; diff --git a/www/common/sframe-common-outer.js b/www/common/sframe-common-outer.js index ca60c2243..bc1f2f725 100644 --- a/www/common/sframe-common-outer.js +++ b/www/common/sframe-common-outer.js @@ -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;