abort loading if promises are not supported in sframe

This commit is contained in:
ansuz 2022-03-16 11:22:09 +05:30
parent 2bffce391a
commit 4ec02b0ad8
1 changed files with 7 additions and 0 deletions

View File

@ -43,5 +43,12 @@ define([
throw e;
};
if (typeof(Promise) !== 'function') {
return void setTimeout(function () {
var s = "Internet Explorer is not supported anymore, including by Microsoft.\n\nMost of CryptPad's collaborative functionality requires a modern browser to work.\n\nWe recommend Mozilla Firefox.";
window.alert(s);
});
}
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
});