Skip to content

Commit

Permalink
Extend TextLayerRenderParameters.container type to include HTMLElement.
Browse files Browse the repository at this point in the history
In PR mozilla#14717, the type was changed from a HTMLElement to a DocumentFragment.
This broke TypeScript projects that use a HTMLElement container.

To remedy this, we extend the type of container to also include HTMLElement.
  • Loading branch information
jerry1100 committed Jun 10, 2022
1 parent 5d88233 commit b716e82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/display/text_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {
* render (the object is returned by the page's `getTextContent` method).
* @property {ReadableStream} [textContentStream] - Text content stream to
* render (the stream is returned by the page's `streamTextContent` method).
* @property {DocumentFragment} container - The DOM node that will contain the
* text runs.
* @property {DocumentFragment | HTMLElement} container - The DOM node that
* will contain the text runs.
* @property {import("./display_utils").PageViewport} viewport - The target
* viewport to properly layout the text runs.
* @property {Array<HTMLElement>} [textDivs] - HTML elements that correspond to
Expand Down

0 comments on commit b716e82

Please sign in to comment.