summaryrefslogtreecommitdiff
path: root/js/App.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-03-10 19:53:09 +0300
committerAndrew Dolgov <[email protected]>2021-03-10 19:53:09 +0300
commit143617afb1cf5f0c1fb5baa3e629b3bc92064eae (patch)
tree29d37cc52b97a617fac6045829173245817398d3 /js/App.js
parent84fe383ed4ceba9532959f3d9eb1876d9a9cfc84 (diff)
* it feels weird for requireIdleCallback() to be optional while more
modern browser features are required * simplify browser startup feature check a bit
Diffstat (limited to 'js/App.js')
-rw-r--r--js/App.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/js/App.js b/js/App.js
index e19b3e878..649571593 100644
--- a/js/App.js
+++ b/js/App.js
@@ -688,15 +688,16 @@ const App = {
checkBrowserFeatures: function() {
let errorMsg = "";
- ['MutationObserver'].forEach(function(wf) {
- if (!(wf in window)) {
- errorMsg = `Browser feature check failed: <code>window.${wf}</code> not found.`;
+ ['MutationObserver', 'requestIdleCallback'].forEach((t) => {
+ if (!(t in window)) {
+ errorMsg = `Browser check failed: <code>window.${t}</code> not found.`;
throw new Error(errorMsg);
}
});
- if (errorMsg) {
- this.Error.fatal(errorMsg, {info: navigator.userAgent});
+ if (typeof Promise.allSettled == "undefined") {
+ errorMsg = `Browser check failed: <code>Promise.allSettled</code> is not defined.`;
+ throw new Error(errorMsg);
}
return errorMsg == "";