Page MenuHomeGitPull.it

class JX.Stratcom
Javelin Documentation ()

Javelin strategic command, the master event delegation core. This class is a sort of hybrid between Arbiter and traditional event delegation, and serves to route event information to handlers in a general way.

Each Javelin :JX.Event has a 'type', which may be a normal Javascript type (for instance, a click or a keypress) or an application-defined type. It also has a "path", based on the path in the DOM from the root node to the event target. Note that, while the type is required, the path may be empty (it often will be for application-defined events which do not originate from the DOM).

The path is determined by walking down the tree to the event target and looking for nodes that have been tagged with metadata. These names are used to build the event path, and unnamed nodes are ignored. Each named node may also have data attached to it.

Listeners specify one or more event types they are interested in handling, and, optionally, one or more paths. A listener will only receive events which occurred on paths it is listening to. See listen() for more details.

Tasks

Builtin Events

  • static listen(type, callback) — 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.

Invoking Events

No methods for this task.

Listening to Events

No methods for this task.

Responding to Events

No methods for this task.

Managing Sigils

No methods for this task.

Managing Metadata

No methods for this task.

Internals

No methods for this task.

Other Methods

Methods

static listen(type, callback)
Inherited

JX.Base

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().

Parameters
type
callback
This method is not documented.
Defined
core/Stratcom.js:42
Extends
JX.Base