Augmented.js Next Core - Object and Events
- AugmentedObject
- Configuration
- EVENT_SPLITTER
- eventsApi
- internalOn
- onApi
- offApi
- triggerApi
- triggerEvents
Augmented Object
Base class for other classes to extend from
Supported options:
- events - Event object
optionsobject Object options
Initialize the object
args...any
Returns object Returns this context
Meta
- deprecated: Use the Constructor
The passed options
The Events
Trigger one or many events, firing all bound callbacks. Callbacks are
passed the same arguments as trigger is, apart from the event name
(unless you're listening on "all", which will cause your callback to
receive the true name of the event as the first argument).
namestring The name of the eventargsany any number of additional arguments
Returns object Returns this context
Bind an event to only be triggered a single time. After the first time the callback is invoked, its listener will be removed. If multiple events are passed in using the space-separated syntax, the handler will fire once for each event, not once for a combination of all events.
namestring The name of the eventcallbackfunction The callback to evokecontextobject The context of the callback
Returns object Returns this context
Remove one or many callbacks. If context is null, removes all
callbacks with that function. If callback is null, removes all
callbacks for the event. If name is null, removes all bound
callbacks for all events.
namestring The name of the eventcallbackfunction The callback to evokecontextobject The context of the callback
Returns object Returns this context
Tell this object to stop listening to either specific events ... or to every object it's currently listening to.
objobject The object to stop listening tonamestring The name of the eventcallbackfunction The callback to evoke
Returns object Returns this context
Bind an event to a callback function. Passing "all" will bind
the callback to all events fired.
namestring The name of the eventcallbackfunction The callback to evokecontextobject The context of the callback
Returns object Returns this context
Inversion-of-control versions of on. Tell this object to listen to
an event in another object... keeping track of what it's listening to
for easier unbinding later.
objobject The object to listening tonamestring The name of the eventcallbackfunction The callback to evoke
Returns object Returns this context
Inversion-of-control versions of once.
objobject The object to stop listening tonamestring The name of the eventcallbackfunction The callback to evoke
Returns object Returns this context
A set of configuration properties for the framework
LoggerLevelstring The level of the framework internal loggerMessageBundlestring the base name for messages in the framework (default: Messages)AsynchronousQueueTimeoutnumber the default milisecond timeout (default: 2000)ApplicationInitProcessTimeoutnumber the application init even timeout (default: 1000)
Regular expression used to split event strings.
Iterates over the standard event, callback (as well as the fancy multiple
space-separated events "change blur", callback and jQuery-style event
maps {event: callback}).
iterateefunction Function to iterateeventsobject Event objectname(string | object) Name of event or eventscallbackfunction The function to calloptsany Any other params
Guard the listening argument from the public API.
objobject Object with eventsname(string | object) Name of event or eventscallbackfunction The function to callcontextobject The context of 'this'listeningarray Array of listeners
The reducing API that adds a callback to the events object.
eventsobject Event objectname(string | object) Name of event or eventscallbackfunction The function to calloptionsobject Any options
The reducing API that removes a callback from the events object.
eventsobject Event objectname(string | object) Name of event or eventscallbackfunction The function to calloptionsobject Any options
Handles triggering the appropriate event callbacks.
objEventsobject Event objectname(string | object) Name of event or eventscallbackfunction The function to callargsany Any other arguments
Internal dispatch function for triggering events.
eventsarray The eventsargsany Any otehr arguments