From b716e82d180708d2eabdd08a3b20b4f5a6a6bde0 Mon Sep 17 00:00:00 2001 From: jerry1100 Date: Thu, 9 Jun 2022 14:38:16 -0700 Subject: [PATCH] Extend TextLayerRenderParameters.container type to include HTMLElement. In PR #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. --- src/display/text_layer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display/text_layer.js b/src/display/text_layer.js index 8c1480fee..4d26f3675 100644 --- a/src/display/text_layer.js +++ b/src/display/text_layer.js @@ -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} [textDivs] - HTML elements that correspond to