Do.Method Class
yui3/src/event-custom/js/event-do.js:192
Parent Module: event-custom
Wrapper for a displaced method with aop enabled
Constructor
Do.Method
-
obj
-
sFn
Parameters:
-
obj
ObjectThe object to operate on
-
sFn
ObjectThe name of the method to displace
Methods
delete
-
sid
-
fn
-
when
Unregister a aop subscriber
Parameters:
-
sid
Stringthe subscriber id
-
fn
Functionthe function to execute
-
when
Stringwhen to execute the function
exec
-
arg
<p>Execute the wrapped method. All arguments are passed into the wrapping functions. If any of the before wrappers return an instance of <code>Y.Do.Halt</code> or <code>Y.Do.Prevent</code>, neither the wrapped function nor any after phase subscribers will be executed.</p>
<p>The return value will be the return value of the wrapped function or one provided by a wrapper function via an instance of <code>Y.Do.Halt</code> or <code>Y.Do.AlterReturn</code>.
Parameters:
-
arg
Any multipleArguments are passed to the wrapping and wrapped functions
Returns:
Return value of wrapped function unless overwritten (see above)
register
-
sid
-
fn
-
when
Register a aop subscriber
Parameters:
-
sid
Stringthe subscriber id
-
fn
Functionthe function to execute
-
when
Stringwhen to execute the function