See https://bugzilla.mozilla.org/show_bug.cgi?id=1735738 for reference.
});
              self.canvas.width = viewport.width;
              self.canvas.height = viewport.height;
              self._clearCanvas();
              
              var renderAnnotations = false,
                renderForms = false,
                renderPrint = false,
                renderXfa = false;
              if (task.annotationStorage) {
                const entries = Object.entries(task.annotationStorage),
                  docAnnotationStorage = task.pdfDoc.annotationStorage;
                for (const [key, value] of entries) {
                  docAnnotationStorage.setValue(key, value);
                }
              }
              var textLayerCanvas, annotationLayerCanvas;
              var initPromise;
              if (task.type === "text") {
                
                textLayerCanvas = self.textLayerCanvas;
                if (!textLayerCanvas) {
                  textLayerCanvas = document.createElement("canvas");
                  self.textLayerCanvas = textLayerCanvas;
                }
                textLayerCanvas.width = viewport.width;
                textLayerCanvas.height = viewport.height;
                var textLayerContext = textLayerCanvas.getContext("2d");
                textLayerContext.clearRect(
                  0,