Yahoo! UI Library

event-custom  3.3.0pr1

Yahoo! UI Library > event-custom > Do
Search:
 
Filters

static Class Do

Allows for the insertion of methods that are executed before or after a specified method

Properties

Do.currentRetVal - static object

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.

Do.originalRetVal - static object

Contains the return value from the wrapped method, accessible by 'after' event listeners.

objs - static object

Cache of objects touched by the utility

Methods

_inject

private static string _inject ( when , fn , obj , sFn , c )
Execute the supplied method after the specified function
Parameters:
when <string> before or after
fn <Function> the function to execute
obj <object> the object hosting the method to displace
sFn <string> the name of the method to displace
c <object> The execution context for fn
Returns: string
handle for the subscription

after

static string after ( fn , obj , sFn , c , arg* )
Execute the supplied method after the specified function
Parameters:
fn <Function> the function to execute
obj <object> the object hosting the method to displace
sFn <string> the name of the method to displace
c <object> The execution context for fn
arg* <mixed> 0..n additional arguments to supply to the subscriber
Returns: string
handle for the subscription

before

static string before ( fn , obj , sFn , c , arg* )
Execute the supplied method before the specified function
Parameters:
fn <Function> the function to execute
obj <object> the object hosting the method to displace
sFn <string> the name of the method to displace
c <object> The execution context for fn
arg* <mixed> 0..n additional arguments to supply to the subscriber when the event fires.
Returns: string
handle for the subscription

detach

void detach ( handle )
Detach a before or after subscription
Parameters:
handle <string> the subscription handle


Copyright © 2010 Yahoo! Inc. All rights reserved.