events

Defined as a JavaScript array object containing a list of event names exposed by the view adapter. Each named event is added by AtomicJS to theonproperty of the assembled view adapter as apub/subinstance. Consumers may register to listen to each event by calling thelistenmethod of each. Consumers may also stop listening to each event by calling the correspondingignoremethod of each.

Example:

function eventHandler(parameter1)
{
}

// start listening to customEvent1 of the exampleViewAdapter
exampleViewAdapter.on.customEvent1.listen(eventHandler);

// stop listening to customEvent1 of the exampleViewAdapter
exampleViewAdapter.on.customEvent1.ignore(eventHandler);

results matching ""

    No results matching ""