Directly use requestIdleCallback
in MOZCENTRAL
-builds
Given the following compatibility information, we really shouldn't need to check for the availability of `requestIdleCallback` in Firefox; see https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback#browser_compatibility
This commit is contained in:
parent
7f8a9b12d9
commit
1ca816d724
@ -1423,7 +1423,10 @@ const PDFViewerApplication = {
|
||||
pdfViewer.optionalContentConfigPromise.then(optionalContentConfig => {
|
||||
this.pdfLayerViewer.render({ optionalContentConfig, pdfDocument });
|
||||
});
|
||||
if ("requestIdleCallback" in window) {
|
||||
if (
|
||||
(typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) ||
|
||||
"requestIdleCallback" in window
|
||||
) {
|
||||
const callback = window.requestIdleCallback(
|
||||
() => {
|
||||
this._collectTelemetry(pdfDocument);
|
||||
|
Loading…
x
Reference in New Issue
Block a user