Allows for the insertion of methods that are executed before or after a specified method
_inject
when
fn
obj
sFn
c
Defined in
event-custom/js/event-do.js:109
Execute the supplied method before or after the specified function.
Used by before
and after
.
handle for the subscription
after
fn
obj
sFn
c
arg
Defined in
event-custom/js/event-do.js:72
Execute the supplied method after the specified function. Wrapping function may optionally return an instance of the following classes to further alter runtime behavior:
returnValue
. No other wrapping functions will be
executed.returnValue
instead of the wrapped
method's original return value. This can be further altered by
other after phase wrappers.The static properties Y.Do.originalRetVal
and
Y.Do.currentRetVal
will be populated for reference.
handle for the subscription
before
fn
obj
sFn
c
arg
Defined in
event-custom/js/event-do.js:34
Execute the supplied method before the specified function. Wrapping function may optionally return an instance of the following classes to further alter runtime behavior:
returnValue
. No other wrapping functions will be
executed.handle for the subscription
detach
handle
Defined in
event-custom/js/event-do.js:153
Detach a before or after subscription.
handle
EventHandle
the subscription handle
currentRetVal
Defined in
event-custom/js/event-do.js:180
Available since 3.2.0
Contains the current state of the return value, consumable by 'after' event listeners, and updated if an after subscriber changes the return value generated by the wrapped function.
objs
Defined in
event-custom/js/event-do.js:20
Deprecated: Since 3.6.0. The `_yuiaop` property on the AOP'd object replaces the role of this property, but is considered to be private, and is only mentioned to provide a migration path. If you have a use case which warrants migration to the _yuiaop property, please file a ticket to let us know what it's used for and we can see if we need to expose hooks for that functionality more formally.
Cache of objects touched by the utility
originalRetVal
Defined in
event-custom/js/event-do.js:171
Available since 3.2.0
Contains the return value from the wrapped method, accessible by 'after' event listeners.