core_filters/events

Description:
  • Javascript events for the core_filters subsystem.

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

Javascript events for the core_filters subsystem.

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

Description:
  • Events for the core_filters subsystem.

Source:
Properties:
Name Type Description
filterContentUpdated String

See event:filterContentUpdated

Events for the core_filters subsystem.

Methods

(inner) notifyFilterContentUpdated(nodes) → {CustomEvent}

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

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

Events

filterContentUpdated

Description:
  • 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.

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

The list of parent nodes which were updated

Type:
  • CustomEvent
Listeners of This Event: