Consistently use square brackets for optional parameters in JSDoc comments

Square brackets are recommended to indicate optional parameters. Using
them helps for automatically generating correct documentation.
This commit is contained in:
Tim van der Meij 2019-10-12 16:30:32 +02:00
parent efd331daa1
commit f4daafc077
No known key found for this signature in database
GPG Key ID: 8C3FD2925A5F2762
21 changed files with 136 additions and 138 deletions

View File

@ -458,7 +458,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
/**
* @param {CCITTFaxDecoderSource} source - The data which should be decoded.
* @param {Object} options - (optional) Decoding options.
* @param {Object} [options] - Decoding options.
*/
function CCITTFaxDecoder(source, options = {}) {
if (!source || typeof source.next !== 'function') {

View File

@ -863,8 +863,8 @@ class Catalog {
* @property {Dict} destDict - The dictionary containing the destination.
* @property {Object} resultObj - The object where the parsed destination
* properties will be placed.
* @property {string} docBaseUrl - (optional) The document base URL that is
* used when attempting to recover valid absolute URLs from relative ones.
* @property {string} [docBaseUrl] - The document base URL that is used when
* attempting to recover valid absolute URLs from relative ones.
*/
/**

View File

@ -31,8 +31,8 @@ import {
* @property {PageViewport} viewport
* @property {IPDFLinkService} linkService
* @property {DownloadManager} downloadManager
* @property {string} imageResourcesPath - (optional) Path for image resources,
* mainly for annotation icons. Include trailing slash.
* @property {string} [imageResourcesPath] - Path for image resources, mainly
* for annotation icons. Include trailing slash.
* @property {boolean} renderInteractiveForms
* @property {Object} svgFactory
*/
@ -1328,8 +1328,8 @@ class FileAttachmentAnnotationElement extends AnnotationElement {
* @property {PDFPage} page
* @property {IPDFLinkService} linkService
* @property {DownloadManager} downloadManager
* @property {string} imageResourcesPath - (optional) Path for image resources,
* mainly for annotation icons. Include trailing slash.
* @property {string} [imageResourcesPath] - Path for image resources, mainly
* for annotation icons. Include trailing slash.
* @property {boolean} renderInteractiveForms
*/

View File

@ -160,22 +160,22 @@ class DOMSVGFactory {
* @property {Array} viewBox - The xMin, yMin, xMax and yMax coordinates.
* @property {number} scale - The scale of the viewport.
* @property {number} rotation - The rotation, in degrees, of the viewport.
* @property {number} offsetX - (optional) The horizontal, i.e. x-axis, offset.
* The default value is `0`.
* @property {number} offsetY - (optional) The vertical, i.e. y-axis, offset.
* The default value is `0`.
* @property {boolean} dontFlip - (optional) If true, the y-axis will not be
* flipped. The default value is `false`.
* @property {number} [offsetX] - The horizontal, i.e. x-axis, offset. The
* default value is `0`.
* @property {number} [offsetY] - The vertical, i.e. y-axis, offset. The
* default value is `0`.
* @property {boolean} [dontFlip] - If true, the y-axis will not be flipped.
* The default value is `false`.
*/
/**
* @typedef {Object} PageViewportCloneParameters
* @property {number} scale - (optional) The scale, overriding the one in the
* cloned viewport. The default value is `this.scale`.
* @property {number} rotation - (optional) The rotation, in degrees, overriding
* the one in the cloned viewport. The default value is `this.rotation`.
* @property {boolean} dontFlip - (optional) If true, the x-axis will not be
* flipped. The default value is `false`.
* @property {number} [scale] - The scale, overriding the one in the cloned
* viewport. The default value is `this.scale`.
* @property {number} [rotation] - The rotation, in degrees, overriding the one
* in the cloned viewport. The default value is `this.rotation`.
* @property {boolean} [dontFlip] - If true, the x-axis will not be flipped.
* The default value is `false`.
*/
/**
@ -251,7 +251,7 @@ class PageViewport {
/**
* Clones viewport, with optional additional properties.
* @param {PageViewportCloneParameters} - (optional)
* @param {PageViewportCloneParameters} [params]
* @return {PageViewport} Cloned viewport.
*/
clone({ scale = this.scale, rotation = this.rotation,
@ -334,12 +334,12 @@ const LinkTargetStringMap = [
* @typedef ExternalLinkParameters
* @typedef {Object} ExternalLinkParameters
* @property {string} url - An absolute URL.
* @property {LinkTarget} target - (optional) The link target.
* The default value is `LinkTarget.NONE`.
* @property {string} rel - (optional) The link relationship.
* The default value is `DEFAULT_LINK_REL`.
* @property {boolean} enabled - (optional) Whether the link should be enabled.
* The default value is true.
* @property {LinkTarget} [target] - The link target. The default value is
* `LinkTarget.NONE`.
* @property {string} [rel] - The link relationship. The default value is
* `DEFAULT_LINK_REL`.
* @property {boolean} [enabled] - Whether the link should be enabled. The
* default value is true.
*/
/**

View File

@ -20,24 +20,23 @@ import globalScope from '../shared/global_scope';
* Text layer render parameters.
*
* @typedef {Object} TextLayerRenderParameters
* @property {TextContent} textContent - (optional) Text content to render
* (the object is returned by the page's getTextContent() method).
* @property {ReadableStream} textContentStream - (optional) Text content
* stream to render (the stream is returned by the page's
* streamTextContent() method).
* @property {TextContent} [textContent] - Text content to 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 {HTMLElement} container - HTML element that will contain text runs.
* @property {PageViewport} viewport - The target viewport to properly
* layout the text runs.
* @property {Array} textDivs - (optional) HTML elements that are correspond
* the text items of the textContent input. This is output and shall be
* @property {Array} [textDivs] - HTML elements that are correspond to the
* text items of the textContent input. This is output and shall be
* initially be set to empty array.
* @property {Array} textContentItemsStr - (optional) Strings that correspond
* the `str` property of the text items of textContent input. This is output
* @property {Array} [textContentItemsStr] - Strings that correspond to the
* `str` property of the text items of textContent input. This is output
* and shall be initially be set to empty array.
* @property {number} timeout - (optional) Delay in milliseconds before
* rendering of the text runs occurs.
* @property {boolean} enhanceTextSelection - (optional) Whether to turn on the
* text selection enhancement.
* @property {number} [timeout] - Delay in milliseconds before rendering of the
* text runs occurs.
* @property {boolean} [enhanceTextSelection] - Whether to turn on the text
* selection enhancement.
*/
var renderTextLayer = (function renderTextLayerClosure() {
var MAX_TEXT_DIVS_TO_RENDER = 100000;

View File

@ -134,7 +134,7 @@ MessageHandler.prototype = {
* Sends a message to the comObj to invoke the action with the supplied data.
* @param {string} actionName - Action to call.
* @param {JSON} data - JSON data to send.
* @param {Array} [transfers] - Optional list of transfers/ArrayBuffers
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
*/
send(actionName, data, transfers) {
this.postMessage({
@ -149,7 +149,7 @@ MessageHandler.prototype = {
* Expects that the other side will callback with the response.
* @param {string} actionName - Action to call.
* @param {JSON} data - JSON data to send.
* @param {Array} [transfers] - Optional list of transfers/ArrayBuffers.
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
* @returns {Promise} Promise to be resolved with response data.
*/
sendWithPromise(actionName, data, transfers) {
@ -174,9 +174,9 @@ MessageHandler.prototype = {
* Expect that the other side will callback to signal 'start_complete'.
* @param {string} actionName - Action to call.
* @param {JSON} data - JSON data to send.
* @param {Object} queueingStrategy - strategy to signal backpressure based on
* @param {Object} queueingStrategy - Strategy to signal backpressure based on
* internal queue.
* @param {Array} [transfers] - Optional list of transfers/ArrayBuffers.
* @param {Array} [transfers] - List of transfers/ArrayBuffers.
* @return {ReadableStream} ReadableStream to read data in chunks.
*/
sendWithStream(actionName, data, queueingStrategy, transfers) {

View File

@ -21,8 +21,8 @@ import { SimpleLinkService } from './pdf_link_service';
* @typedef {Object} AnnotationLayerBuilderOptions
* @property {HTMLDivElement} pageDiv
* @property {PDFPage} pdfPage
* @property {string} imageResourcesPath - (optional) Path for image resources,
* mainly for annotation icons. Include trailing slash.
* @property {string} [imageResourcesPath] - Path for image resources, mainly
* for annotation icons. Include trailing slash.
* @property {boolean} renderInteractiveForms
* @property {IPDFLinkService} linkService
* @property {DownloadManager} downloadManager
@ -109,8 +109,8 @@ class DefaultAnnotationLayerFactory {
/**
* @param {HTMLDivElement} pageDiv
* @param {PDFPage} pdfPage
* @param {string} imageResourcesPath - (optional) Path for image resources,
* mainly for annotation icons. Include trailing slash.
* @param {string} [imageResourcesPath] - Path for image resources, mainly
* for annotation icons. Include trailing slash.
* @param {boolean} renderInteractiveForms
* @param {IL10n} l10n
* @returns {AnnotationLayerBuilder}

View File

@ -609,9 +609,9 @@ let PDFViewerApplication = {
/**
* Opens PDF document specified by URL or array with additional arguments.
* @param {string|TypedArray|ArrayBuffer} file - PDF location or binary data.
* @param {Object} args - (optional) Additional arguments for the getDocument
* call, e.g. HTTP headers ('httpHeaders') or
* alternative data transport ('range').
* @param {Object} [args] - Additional arguments for the getDocument call,
* e.g. HTTP headers ('httpHeaders') or alternative
* data transport ('range').
* @returns {Promise} - Returns the promise, which is resolved when document
* is opened.
*/
@ -764,10 +764,10 @@ let PDFViewerApplication = {
/**
* Show the error box.
* @param {string} message A message that is human readable.
* @param {Object} moreInfo (optional) Further information about the error
* that is more technical. Should have a 'message'
* and optionally a 'stack' property.
* @param {string} message - A message that is human readable.
* @param {Object} [moreInfo] - Further information about the error that is
* more technical. Should have a 'message' and
* optionally a 'stack' property.
*/
error(message, moreInfo) {
let moreInfoText = [this.l10n.get('error_version_info',

View File

@ -33,36 +33,35 @@ const DEFAULT_CACHE_SIZE = 10;
/**
* @typedef {Object} PDFViewerOptions
* @property {HTMLDivElement} container - The container for the viewer element.
* @property {HTMLDivElement} viewer - (optional) The viewer element.
* @property {HTMLDivElement} [viewer] - The viewer element.
* @property {EventBus} eventBus - The application event bus.
* @property {IPDFLinkService} linkService - The navigation/linking service.
* @property {DownloadManager} downloadManager - (optional) The download
* manager component.
* @property {PDFFindController} findController - (optional) The find
* controller component.
* @property {PDFRenderingQueue} renderingQueue - (optional) The rendering
* queue object.
* @property {boolean} removePageBorders - (optional) Removes the border shadow
* around the pages. The default value is `false`.
* @property {number} textLayerMode - (optional) Controls if the text layer used
* for selection and searching is created, and if the improved text selection
* @property {DownloadManager} [downloadManager] - The download manager
* component.
* @property {PDFFindController} [findController] - The find controller
* component.
* @property {PDFRenderingQueue} [renderingQueue] - The rendering queue object.
* @property {boolean} [removePageBorders] - Removes the border shadow around
* the pages. The default value is `false`.
* @property {number} [textLayerMode] - Controls if the text layer used for
* selection and searching is created, and if the improved text selection
* behaviour is enabled. The constants from {TextLayerMode} should be used.
* The default value is `TextLayerMode.ENABLE`.
* @property {string} imageResourcesPath - (optional) Path for image resources,
* @property {string} [imageResourcesPath] - Path for image resources, mainly
* mainly for annotation icons. Include trailing slash.
* @property {boolean} renderInteractiveForms - (optional) Enables rendering of
* @property {boolean} [renderInteractiveForms] - Enables rendering of
* interactive form elements. The default is `false`.
* @property {boolean} enablePrintAutoRotate - (optional) Enables automatic
* rotation of pages whose orientation differ from the first page upon
* printing. The default is `false`.
* @property {boolean} [enablePrintAutoRotate] - Enables automatic rotation of
* pages whose orientation differ from the first page upon printing. The
* default is `false`.
* @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'.
* @property {boolean} enableWebGL - (optional) Enables WebGL accelerated
* rendering for some operations. The default value is `false`.
* @property {boolean} useOnlyCssZoom - (optional) Enables CSS only zooming.
* The default value is `false`.
* @property {number} maxCanvasPixels - (optional) The maximum supported canvas
* size in total pixels, i.e. width * height. Use -1 for no limit.
* The default value is 4096 * 4096 (16 mega-pixels).
* @property {boolean} [enableWebGL] - Enables WebGL accelerated rendering for
* some operations. The default value is `false`.
* @property {boolean} [useOnlyCssZoom] - Enables CSS only zooming. The default
* value is `false`.
* @property {number} [maxCanvasPixels] - The maximum supported canvas size in
* total pixels, i.e. width * height. Use -1 for no limit. The default value
* is 4096 * 4096 (16 mega-pixels).
* @property {IL10n} l10n - Localization service.
*/
@ -666,10 +665,10 @@ class BaseViewer {
/**
* @typedef ScrollPageIntoViewParameters
* @property {number} pageNumber - The page number.
* @property {Array} destArray - (optional) The original PDF destination
* array, in the format: <page-ref> </XYZ|/FitXXX> <args..>
* @property {boolean} allowNegativeOffset - (optional) Allow negative page
* offsets. The default value is `false`.
* @property {Array} [destArray] - The original PDF destination array, in the
* format: <page-ref> </XYZ|/FitXXX> <args..>
* @property {boolean} [allowNegativeOffset] - Allow negative page offsets.
* The default value is `false`.
*/
/**
@ -1009,8 +1008,8 @@ class BaseViewer {
/**
* @param {HTMLDivElement} pageDiv
* @param {PDFPage} pdfPage
* @param {string} imageResourcesPath - (optional) Path for image resources,
* mainly for annotation icons. Include trailing slash.
* @param {string} [imageResourcesPath] - Path for image resources, mainly
* for annotation icons. Include trailing slash.
* @param {boolean} renderInteractiveForms
* @param {IL10n} l10n
* @returns {AnnotationLayerBuilder}

View File

@ -30,11 +30,11 @@ let ChromeCom = {
* Creates an event that the extension is listening for and will
* asynchronously respond by calling the callback.
*
* @param {string} action The action to trigger.
* @param {string} data Optional data to send.
* @param {Function} callback Optional response callback that will be called
* with one data argument. When the request cannot be handled, the callback
* is immediately invoked with no arguments.
* @param {string} action - The action to trigger.
* @param {string} [data] - The data to send.
* @param {Function} [callback] - Response callback that will be called with
* one data argument. When the request cannot be handled, the callback is
* immediately invoked with no arguments.
*/
request(action, data, callback) {
let message = {

View File

@ -32,8 +32,8 @@ let FirefoxCom = (function FirefoxComClosure() {
* synchronously respond to.
* NOTE: It is reccomended to use request() instead since one day we may not
* be able to synchronously reply.
* @param {string} action The action to trigger.
* @param {string} data Optional data to send.
* @param {string} action - The action to trigger.
* @param {string} [data] - The data to send.
* @return {*} The response.
*/
requestSync(action, data) {
@ -52,10 +52,10 @@ let FirefoxCom = (function FirefoxComClosure() {
/**
* Creates an event that the extension is listening for and will
* asynchronously respond by calling the callback.
* @param {string} action The action to trigger.
* @param {string} data Optional data to send.
* @param {Function} callback Optional response callback that will be called
* with one data argument.
* @param {string} action - The action to trigger.
* @param {string} [data] - The data to send.
* @param {Function} [callback] - Response callback that will be called
* with one data argument.
*/
request(action, data, callback) {
let request = document.createTextNode('');

View File

@ -156,8 +156,8 @@ class IPDFAnnotationLayerFactory {
/**
* @param {HTMLDivElement} pageDiv
* @param {PDFPage} pdfPage
* @param {string} imageResourcesPath - (optional) Path for image resources,
* mainly for annotation icons. Include trailing slash.
* @param {string} [imageResourcesPath] - Path for image resources, mainly
* for annotation icons. Include trailing slash.
* @param {boolean} renderInteractiveForms
* @param {IL10n} l10n
* @returns {AnnotationLayerBuilder}

View File

@ -27,13 +27,13 @@ class OverlayManager {
/**
* @param {string} name - The name of the overlay that is registered.
* @param {HTMLDivElement} element - The overlay's DOM element.
* @param {function} callerCloseMethod - (optional) The method that, if
* present, calls `OverlayManager.close` from the object
* registering the overlay. Access to this method is
* necessary in order to run cleanup code when e.g.
* the overlay is force closed. The default is `null`.
* @param {boolean} canForceClose - (optional) Indicates if opening the
* overlay closes an active overlay. The default is `false`.
* @param {function} [callerCloseMethod] - The method that, if present, calls
* `OverlayManager.close` from the object registering the
* overlay. Access to this method is necessary in order to
* run cleanup code when e.g. the overlay is force closed.
* The default is `null`.
* @param {boolean} [canForceClose] - Indicates if opening the overlay closes
* an active overlay. The default is `false`.
* @returns {Promise} A promise that is resolved when the overlay has been
* registered.
*/

View File

@ -25,9 +25,9 @@ const CursorTool = {
* @typedef {Object} PDFCursorToolsOptions
* @property {HTMLDivElement} container - The document container.
* @property {EventBus} eventBus - The application event bus.
* @property {number} cursorToolOnLoad - (optional) The cursor tool that will be
* enabled on load; the constants from {CursorTool} should be used.
* The default value is `CursorTool.SELECT`.
* @property {number} [cursorToolOnLoad] - The cursor tool that will be enabled
* on load; the constants from {CursorTool} should be used. The default value
* is `CursorTool.SELECT`.
*/
class PDFCursorTools {

View File

@ -33,15 +33,15 @@ const UPDATE_VIEWAREA_TIMEOUT = 1000; // milliseconds
/**
* @typedef {Object} InitializeParameters
* @property {string} fingerprint - The PDF document's unique fingerprint.
* @property {boolean} resetHistory - (optional) Reset the browsing history.
* @property {boolean} updateUrl - (optional) Attempt to update the document
* URL, with the current hash, when pushing/replacing browser history entries.
* @property {boolean} [resetHistory] - Reset the browsing history.
* @property {boolean} [updateUrl] - Attempt to update the document URL, with
* the current hash, when pushing/replacing browser history entries.
*/
/**
* @typedef {Object} PushParameters
* @property {string} namedDest - (optional) The named destination. If absent,
* a stringified version of `explicitDest` is used.
* @property {string} [namedDest] - The named destination. If absent, a
* stringified version of `explicitDest` is used.
* @property {Array} explicitDest - The explicit destination array.
* @property {number} pageNumber - The page to which the destination points.
*/

View File

@ -18,11 +18,11 @@ import { getGlobalEventBus, parseQueryString } from './ui_utils';
/**
* @typedef {Object} PDFLinkServiceOptions
* @property {EventBus} eventBus - The application event bus.
* @property {number} externalLinkTarget - (optional) Specifies the `target`
* attribute for external links. Must use one of the values from {LinkTarget}.
* @property {number} [externalLinkTarget] - Specifies the `target` attribute
* for external links. Must use one of the values from {LinkTarget}.
* Defaults to using no target.
* @property {string} externalLinkRel - (optional) Specifies the `rel` attribute
* for external links. Defaults to stripping the referrer.
* @property {string} [externalLinkRel] - Specifies the `rel` attribute for
* external links. Defaults to stripping the referrer.
*/
/**

View File

@ -32,23 +32,23 @@ import { viewerCompatibilityParams } from './viewer_compatibility';
* @property {PageViewport} defaultViewport - The page viewport.
* @property {PDFRenderingQueue} renderingQueue - The rendering queue object.
* @property {IPDFTextLayerFactory} textLayerFactory
* @property {number} textLayerMode - (optional) Controls if the text layer used
* for selection and searching is created, and if the improved text selection
* @property {number} [textLayerMode] - Controls if the text layer used for
* selection and searching is created, and if the improved text selection
* behaviour is enabled. The constants from {TextLayerMode} should be used.
* The default value is `TextLayerMode.ENABLE`.
* @property {IPDFAnnotationLayerFactory} annotationLayerFactory
* @property {string} imageResourcesPath - (optional) Path for image resources,
* mainly for annotation icons. Include trailing slash.
* @property {string} [imageResourcesPath] - Path for image resources, mainly
* for annotation icons. Include trailing slash.
* @property {boolean} renderInteractiveForms - Turns on rendering of
* interactive form elements. The default is `false`.
* @property {string} renderer - 'canvas' or 'svg'. The default is 'canvas'.
* @property {boolean} enableWebGL - (optional) Enables WebGL accelerated
* rendering for some operations. The default value is `false`.
* @property {boolean} useOnlyCssZoom - (optional) Enables CSS only zooming.
* The default value is `false`.
* @property {number} maxCanvasPixels - (optional) The maximum supported canvas
* size in total pixels, i.e. width * height. Use -1 for no limit.
* The default value is 4096 * 4096 (16 mega-pixels).
* @property {boolean} [enableWebGL] - Enables WebGL accelerated rendering for
* some operations. The default value is `false`.
* @property {boolean} [useOnlyCssZoom] - Enables CSS only zooming. The default
* value is `false`.
* @property {number} [maxCanvasPixels] - The maximum supported canvas size in
* total pixels, i.e. width * height. Use -1 for no limit. The default value
* is 4096 * 4096 (16 mega-pixels).
* @property {IL10n} l10n - Localization service.
*/

View File

@ -32,11 +32,11 @@ const SWIPE_ANGLE_THRESHOLD = Math.PI / 6;
/**
* @typedef {Object} PDFPresentationModeOptions
* @property {HTMLDivElement} container - The container for the viewer element.
* @property {HTMLDivElement} viewer - (optional) The viewer element.
* @property {HTMLDivElement} [viewer] - The viewer element.
* @property {PDFViewer} pdfViewer - The document viewer.
* @property {EventBus} eventBus - The application event bus.
* @property {Array} contextMenuItems - (optional) The menu items that are added
* to the context menu in Presentation Mode.
* @property {Array} [contextMenuItems] - The menu items that are added to the
* context menu in Presentation Mode.
*/
class PDFPresentationMode {

View File

@ -34,8 +34,8 @@ const SidebarView = {
* @property {PDFThumbnailViewer} pdfThumbnailViewer - The thumbnail viewer.
* @property {EventBus} eventBus - The application event bus.
* @property {IL10n} l10n - The localization service.
* @property {boolean} disableNotification - (optional) Disable the notification
* for documents containing outline/attachments. The default value is `false`.
* @property {boolean} [disableNotification] - Disable the notification for
* documents containing outline/attachments. The default value is `false`.
*/
/**
@ -153,8 +153,8 @@ class PDFSidebar {
/**
* @param {number} view - The sidebar view that should be switched to,
* must be one of the values in {SidebarView}.
* @param {boolean} forceOpen - (optional) Ensure that the sidebar is open.
* The default value is `false`.
* @param {boolean} [forceOpen] - Ensure that the sidebar is open.
* The default value is `false`.
*/
switchView(view, forceOpen = false) {
this._switchView(view, forceOpen);

View File

@ -30,9 +30,9 @@ const THUMBNAIL_WIDTH = 98; // px
* @property {PageViewport} defaultViewport - The page viewport.
* @property {IPDFLinkService} linkService - The navigation/linking service.
* @property {PDFRenderingQueue} renderingQueue - The rendering queue object.
* @property {boolean} disableCanvasToImageConversion - (optional) Don't convert
* the canvas thumbnails to images. This prevents `toDataURL` calls,
* but increases the overall memory usage. The default value is `false`.
* @property {boolean} [disableCanvasToImageConversion] - Don't convert the
* canvas thumbnails to images. This prevents `toDataURL` calls, but
* increases the overall memory usage. The default value is `false`.
* @property {IL10n} l10n - Localization service.
*/

View File

@ -79,8 +79,8 @@ class TextLayerBuilder {
/**
* Renders the text layer.
*
* @param {number} timeout - (optional) wait for a specified amount of
* milliseconds before rendering
* @param {number} [timeout] - Wait for a specified amount of milliseconds
* before rendering.
*/
render(timeout = 0) {
if (!(this.textContent || this.textContentStream) || this.renderingDone) {