[GeckoView] Skip fetching/parsing of pageLabels
Currently there's no toolbar in the GV-viewer, hence invoking the pageLabels functionality isn't meaningful and just leads to unnecessary parsing on both the main- and worker-threads. (And if a toolbar is added at some point, it's not clear to me if we'd want to support pageLabels in the GV-viewer anyway.)
This commit is contained in:
parent
8c4843f69a
commit
a348162c5b
@ -1531,6 +1531,13 @@ const PDFViewerApplication = {
|
||||
* @private
|
||||
*/
|
||||
async _initializePageLabels(pdfDocument) {
|
||||
if (
|
||||
typeof PDFJSDev === "undefined"
|
||||
? window.isGECKOVIEW
|
||||
: PDFJSDev.test("GECKOVIEW")
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const labels = await pdfDocument.getPageLabels();
|
||||
|
||||
if (pdfDocument !== this.pdfDocument) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user