core_filters/events

Javascript events for the core_filters subsystem.

Source:
Since:
  • 4.0
License:
  • http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Example

Example of listening to a filter event.

import {eventTypes as filterEventTypes} from 'core_filters/events';

document.addEventListener(filterEventTypes.filterContentUpdated, e => {
    window.console.log(e.detail.nodes); // A list of the HTMLElements whose content was updated
});

Members

(static, constant) eventTypes

Source:
Properties:
Name Type Description
filterContentUpdated String

See event:filterContentUpdated

filterContentRenderingComplete String

See event:filterContentRenderingComplete

Events for the core_filters subsystem.

Methods

(inner) notifyFilterContentRenderingComplete(nodes) → {CustomEvent}

Source:

Trigger an event to indicate that the filter has been processed.

Parameters:
Name Type Description
nodes NodeList | Array.<Node>

List of nodes that has been modified by filter

Fires:
Returns:
Type
CustomEvent

(inner) notifyFilterContentUpdated(nodes) → {CustomEvent}

Source:

Trigger an event to indicate that the specified nodes were updated and should be processed by the filter system.

Parameters:
Name Type Description
nodes jQuery | Array
Fires:
Returns:
Type
CustomEvent

Events

filterContentRenderingComplete

Source:
Properties:
Name Type Description
detail object

An event triggered when filter system have done rendering the content using the filter system.

Type:
  • CustomEvent

filterContentUpdated

Source:
Properties:
Name Type Description
detail object
Properties
Name Type Description
nodes Array.<NodeElement>

The list of parent nodes which were updated

An event triggered when page content is updated and must be processed by the filter system.

An example of this is loading user text that could have equations in it. MathJax can typeset the equations but only if it is notified that there are new nodes in the page that need processing.

Type:
  • CustomEvent
Listeners of This Event: