event-custom/js/event-custom.js:56
The CustomEvent class lets you define events for your application that can be subscribed to by one or more independent component.
_addFacadeToArgsThe
Provided by the event-custom-complex module.
Defined in
event-custom/js/event-facade.js:420
Utility method to manipulate the args array passed in, to add the event facade, if it's not already the first arg.
The
Array
arguments to manipulate
_broadcastargs
Defined in
event-custom/js/event-custom.js:756
Notifies the YUI instance if the event is configured with broadcast = 1, and both the YUI instance and Y.Global if configured with broadcast = 2.
args
Array
Arguments sent to fire()
_createFacadefireArgs
Provided by the event-custom-complex module.
Defined in
event-custom/js/event-facade.js:360
Internal utility method to create a new facade instance and insert it into the fire argument list, accounting for any payload merging which needs to happen.
This used to be called _getFacade, but the name seemed inappropriate
when it was used without a need for the return value.
fireArgs
Array
The arguments passed to "fire", which need to be shifted (and potentially merged) when the facade is added.
The event facade created.
_deletes
subs
index
Defined in
event-custom/js/event-custom.js:799
Deletes the subscriber from the internal store of on() and after() subscribers.
_fireargs
Defined in
event-custom/js/event-custom.js:663
Private internal implementation for fire, which is can be used directly by
EventTarget and other event module classes which have already converted from
an arguments list to an array, to avoid the repeated overhead.
args
Array
The array of arguments passed to be passed to handlers.
false if one of the subscribers returned false, true otherwise.
_hasPotentialSubscribersProvided by the event-custom-complex module.
Defined in
event-custom/js/event-facade.js:350
Whether the event has potential subscribers or not
_notifys
args
Defined in
event-custom/js/event-custom.js:601
Notify a single subscriber
s
Subscriber
the subscriber.
args
Array
the arguments array to apply to the listener.
_onfn
[context]
[args]
[when]
Defined in
event-custom/js/event-custom.js:436
Create the Subscription for subscribing function, context, and bound arguments. If this is a fireOnce event, the subscriber is immediately notified.
_procSubssubs
args
ef
Defined in
event-custom/js/event-custom.js:726
Notifies a list of subscribers.
Boolean false if a subscriber returns false or stops the event propagation via e.stopPropagation(), e.stopImmediatePropagation(), or e.halt()
afterfn
context
arg
Defined in
event-custom/js/event-custom.js:530
Listen for this event after the normal subscribers have been notified and the default behavior has been applied. If a normal subscriber prevents the default behavior, it also prevents after listeners from firing.
handle Unsubscribe handle.
applyConfigo
force
Defined in
event-custom/js/event-custom.js:425
Apply configuration properties. Only applies the CONFIG whitelist
detachfn
context
Defined in
event-custom/js/event-custom.js:546
Detach listeners.
returns the number of subscribers unsubscribed.
detachAll
Defined in
event-custom/js/event-custom.js:790
Removes all listeners
The number of listeners unsubscribed.
firearguments
Defined in
event-custom/js/event-custom.js:634
Notifies the subscribers. The callback functions will be executed from the context specified when the event was created, and with the following parameters:
arguments
Object*
an arbitrary set of parameters to pass to the handler.
false if one of the subscribers returned false, true otherwise.
fireSimpleargs
Defined in
event-custom/js/event-custom.js:697
Set up for notifying subscribers of non-emitFacade events.
args
Array
Arguments passed to fire()
Boolean false if a subscriber returned false
getSubs
Defined in
event-custom/js/event-custom.js:376
Get all of the subscribers to this event and any sibling event
first item is the on subscribers, second the after.
haltimmediate
Provided by the event-custom-complex module.
Defined in
event-custom/js/event-facade.js:480
Stops the event propagation and prevents the default event behavior.
immediate
Boolean
if true additional listeners on the current target will not be executed
hasSubs
Defined in
event-custom/js/event-custom.js:318
Returns the number of subscribers for this event as the sum of the on() subscribers and after() subscribers.
Number
logmsg
cat
Defined in
event-custom/js/event-custom.js:624
Logger abstraction to centralize the application of the silent flag
monitorwhat
Defined in
event-custom/js/event-custom.js:360
Monitor the event state for the subscribed event. The first parameter is what should be monitored, the rest are the normal parameters when subscribing to an event.
what
String
what to monitor ('detach', 'attach', 'publish').
return value from the monitor event subscription.
onfn
context
arg
Defined in
event-custom/js/event-custom.js:510
Listen for this event
An object with a detach method to detch the handler(s).
preventDefaultProvided by the event-custom-complex module.
Defined in
event-custom/js/event-facade.js:467
Prevents the execution of this event's defaultFn
stopImmediatePropagationProvided by the event-custom-complex module.
Defined in
event-custom/js/event-facade.js:452
Stops propagation to bubble targets, and prevents any remaining subscribers on the current target from executing.
stopPropagationProvided by the event-custom-complex module.
Defined in
event-custom/js/event-facade.js:437
Stop propagation to bubble targets
subscribefn
Defined in
event-custom/js/event-custom.js:497
Deprecated: use on.
Listen for this event
fn
Function
The function to execute.
Unsubscribe handle.
unsubscribefn
context
Defined in
event-custom/js/event-custom.js:588
Deprecated: use detach.
Detach listeners.
returns the number of subscribers unsubscribed.
unsubscribeAll
Defined in
event-custom/js/event-custom.js:780
Deprecated: use detachAll.
Removes all listeners
The number of listeners unsubscribed.
_subscribers
Defined in
event-custom/js/event-custom.js:257
The subscribers to this event
async
Defined in
event-custom/js/event-custom.js:193
fireOnce listeners will fire syncronously unless async is set to true
Default: false
broadcast
Defined in
event-custom/js/event-custom.js:150
If 0, this event does not broadcast. If 1, the YUI instance is notified every time this event fires. If 2, the YUI instance and the YUI global (if event is enabled on the global) are notified every time this event fires.
bubbles
Defined in
event-custom/js/event-custom.js:306
Specifies whether or not a subscriber can stop the event propagation via stopPropagation(), stopImmediatePropagation(), or halt()
Events can only bubble if emitFacade is true.
Default: true
context
Defined in
event-custom/js/event-custom.js:288
The context the the event will fire from by default. Defaults to the YUI instance.
defaultFn
Defined in
event-custom/js/event-custom.js:223
The default function to execute after event listeners have fire, but only if the default action was not prevented.
defaultTargetOnly
Defined in
event-custom/js/event-custom.js:231
Flag for the default function to execute only if the
firing event is the current target. This happens only
when using custom event delegation and setting the
flag to true mimics the behavior of event delegation
in the DOM.
Default: false
emitFacade
Defined in
event-custom/js/event-custom.js:271
If set to true, the custom event will deliver an EventFacade object that is similar to a DOM event object.
Default: false
fired
Defined in
event-custom/js/event-custom.js:168
This event has fired if true
Default: false;
firedWith
Defined in
event-custom/js/event-custom.js:176
An array containing the arguments the custom event was last fired with.
fireOnce
Defined in
event-custom/js/event-custom.js:183
This event should only fire one time if true, and if it has fired, any new subscribers should be notified immediately.
Default: false;
host
Defined in
event-custom/js/event-custom.js:216
Specifies the host for this custom event. This is used to enable event bubbling
keepDeprecatedSubs
Defined in
event-custom/js/event-custom.js:112
Static flag to enable population of the subscribers
and afters properties held on a CustomEvent instance.
These properties were changed to private properties (_subscribers and _afters), and
converted from objects to arrays for performance reasons.
Setting this property to true will populate the deprecated subscribers and afters
properties for people who may be using them (which is expected to be rare). There will
be a performance hit, compared to the new array based implementation.
If you are using these deprecated properties for a use case which the public API does not support, please file an enhancement request, and we can provide an alternate public implementation which doesn't have the performance cost required to maintiain the properties as objects.
Default: false
monitored
Defined in
event-custom/js/event-custom.js:143
Monitor when an event is attached or detached.
preventable
Defined in
event-custom/js/event-custom.js:296
Specifies whether or not this event's default function can be cancelled by a subscriber by executing preventDefault() on the event facade
Default: true
prevented
Defined in
event-custom/js/event-custom.js:209
Flag for preventDefault that is modified during fire(). if it is not 0, the default behavior for this event
preventedFn
Defined in
event-custom/js/event-custom.js:250
The function to execute if a subscriber calls preventDefault
queuable
Defined in
event-custom/js/event-custom.js:159
Specifies whether this event should be queued when the host is actively processing an event. This will effect exectution order of the callbacks for the various events.
Default: false
signature
Defined in
event-custom/js/event-custom.js:279
Supports multiple options for listener signatures in order to port YUI 2 apps.
Default: 9
silent
Defined in
event-custom/js/event-custom.js:73
By default all custom events are logged in the debug build, set silent to true to disable debug outpu for this event.
stopped
Defined in
event-custom/js/event-custom.js:201
Flag for stopPropagation that is modified during fire() 1 means to stop propagation to bubble targets. 2 means to also stop additional subscribers on this target.
stoppedFn
Defined in
event-custom/js/event-custom.js:243
The function to execute if a subscriber calls stopPropagation or stopImmediatePropagation
subscribers
Defined in
event-custom/js/event-custom.js:90
The subscribers to this event
type
Defined in
event-custom/js/event-custom.js:67
The type of event, returned to subscribers when the event fires