Class: Publisher

Publisher

new Publisher()

Creates an event publishing management object. This is used extensively by searchcontext and widgets. One event publisher should be created for each event type.

Source:

Methods

publish(event)

Publishes an event, calling all listener functions in turn with the event object.

Parameters:
Name Type Description
event object

The event object. Can be of any type.

Source:

subscribe(listener)

Subscribes a listening function to this event publisher

Parameters:
Name Type Description
listener function

The function that is passed the event object

Source:

unsubscribe(listener)

Unsubscribes a listening function from this event publisher

Parameters:
Name Type Description
listener function

The function that should no longer receive events

Source:
MLJS - A JavaScript wrapper for the MarkLogic REST API
MarkLogic 2012-2014
Documentation generated by JSDoc 3.2.3-dev on Mon Jul 18 2016 09:14:12 GMT+0100 (BST) using the DocStrap template.