Diviner

Class JX.Base

Definedsrc/docs/Base.js:13
GroupClass Construction

This is not a real class, but JX.install() provides several methods which exist on all Javelin classes. This class documents those methods.

Tasks

Builtin Events

Methods

@{JX.Event} invoke(type, more)

parametersstringtypeEvent type, must be declared when class is installed.
...moreZero or more arguments.
return@{JX.Event}Event object which was dispatched.

Invoke a class event, notifying all listeners. You must declare the events your class invokes when you install it; see JX.install() for documentation. Any arguments you provide will be passed to listener callbacks.

static object listen(type, callback)

parametersstringtypeType of event to listen for.
functioncallbackFunction to call when this event occurs.
returnobjectA reference to the installed listener. You can later remove the listener by calling this object's remove() method.

Static listen interface for listening to events produced by any instance of this class. See listen() for documentation.

object listen(type, callback)

parametersstringtypeType of event to listen for.
functioncallbackFunction to call when this event occurs.
returnobjectA reference to the installed listener. You can later remove the listener by calling this object's remove() method.

Listen for events emitted by this object instance. You can also use the static flavor of this method to listen to events emitted by any instance of this object.

See also JX.Stratcom.listen().