Namespace: onTextParsed

pageText.onTextParsed

An event that fires when a page's text content has been parsed with Readability. If the text content is not parseable, this event does not fire.

Source:

Methods

(static) addListener(listener, options)

Add a listener for the onTextParsed event.

Parameters:
Name Type Description
listener textParsedListener

The listener to add.

options Object

Options for the listener.

Properties
Name Type Attributes Default Description
matchPatterns Array.<string>

The webpages where the listener should be notified about page text.

privateWindows boolean <optional>
false

Whether to notify the listener about pages in private windows.

Source:

(static) hasAnyListeners() → {boolean}

Whether the onTextParsed event has any listeners.

Source:
Returns:

Whether the event has any listeners.

Type
boolean

(static) hasListener(listener) → {boolean}

Whether a specified listener has been added for the onTextParsed event.

Parameters:
Name Type Description
listener textParsedListener

The listener to check.

Source:
Returns:

Whether the listener has been added for the event.

Type
boolean

(static) removeListener(listener)

Remove a listener for the onTextParsed event.

Parameters:
Name Type Description
listener textParsedListener

The listener to remove.

Source:

Type Definitions

textParsedListener(details)

A listener for the onTextParsed event.

Parameters:
Name Type Description
details Object

Additional information about the page data event.

Properties
Name Type Description
pageId string

The ID for the page, unique across browsing sessions.

url string

The URL of the page, without any hash.

title string

The title of the document, parsed by Readability.

content string

The document text content as an HTML string, parsed by Readability.

textContent string

The document text content with HTML tags removed, parsed by Readability.

privateWindow boolean

Whether the page loaded in a private window.

Source: