Class: on

on

new on(event, listener)

Attach an event listener to the passed event.
Parameters:
Name Type Description
event String The name of the event to listen for.
listener function The method to call when the event is fired.
Source:

on

new on(event, id, listener)

Attach an event listener to the passed event only if the passed id matches the document id for the event being fired.
Parameters:
Name Type Description
event String The name of the event to listen for.
id * The document id to match against.
listener function The method to call when the event is fired.
Source: