requestIdleCallback: remove hard dependency for now
This commit is contained in:
parent
54aeb6f592
commit
721f9ad866
|
@ -40,9 +40,12 @@ define(["dojo/_base/declare"], function (declare) {
|
||||||
Headlines.updateSelectedPrompt();
|
Headlines.updateSelectedPrompt();
|
||||||
Headlines.updateFloatingTitle(true);
|
Headlines.updateFloatingTitle(true);
|
||||||
|
|
||||||
window.requestIdleCallback(() => {
|
if ('requestIdleCallback' in window)
|
||||||
|
window.requestIdleCallback(() => {
|
||||||
|
Headlines.syncModified(modified);
|
||||||
|
});
|
||||||
|
else
|
||||||
Headlines.syncModified(modified);
|
Headlines.syncModified(modified);
|
||||||
});
|
|
||||||
}),
|
}),
|
||||||
syncModified: function(modified) {
|
syncModified: function(modified) {
|
||||||
const ops = {
|
const ops = {
|
||||||
|
|
|
@ -95,7 +95,7 @@ require(["dojo/_base/kernel",
|
||||||
checkBrowserFeatures: function() {
|
checkBrowserFeatures: function() {
|
||||||
let errorMsg = "";
|
let errorMsg = "";
|
||||||
|
|
||||||
['requestIdleCallback', 'MutationObserver'].each(function(wf) {
|
['MutationObserver'].each(function(wf) {
|
||||||
if (! (wf in window)) {
|
if (! (wf in window)) {
|
||||||
errorMsg = `Browser feature check failed: <code>window.${wf}</code> not found.`;
|
errorMsg = `Browser feature check failed: <code>window.${wf}</code> not found.`;
|
||||||
throw $break;
|
throw $break;
|
||||||
|
|
Loading…
Reference in New Issue