Skip to content

Commit 41ca92b

Browse files
authored
Merge pull request #20149 from k-nut/patch-1
Mark `canvasContext` as optional
2 parents fcf69d8 + 760c8d6 commit 41ca92b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/display/api.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,16 +1182,16 @@ class PDFDocumentProxy {
11821182
* Page render parameters.
11831183
*
11841184
* @typedef {Object} RenderParameters
1185-
* @property {CanvasRenderingContext2D} canvasContext - 2D context of a DOM
1186-
* Canvas object for backwards compatibility; it is recommended to use the
1187-
* `canvas` parameter instead.
1188-
* If the context must absolutely be used to render the page, the canvas must
1189-
* be null.
11901185
* @property {HTMLCanvasElement|null} canvas - A DOM Canvas object. The default
11911186
* value is the canvas associated with the `canvasContext` parameter if no
11921187
* value is provided explicitly.
11931188
* @property {PageViewport} viewport - Rendering viewport obtained by calling
11941189
* the `PDFPageProxy.getViewport` method.
1190+
* @property {CanvasRenderingContext2D} [canvasContext] - 2D context of a DOM
1191+
* Canvas object for backwards compatibility; it is recommended to use the
1192+
* `canvas` parameter instead.
1193+
* If the context must absolutely be used to render the page, the canvas must
1194+
* be null.
11951195
* @property {string} [intent] - Rendering intent, can be 'display', 'print',
11961196
* or 'any'. The default value is 'display'.
11971197
* @property {number} [annotationMode] Controls which annotations are rendered

0 commit comments

Comments
 (0)