# Yahoo! UI Library

### event-custom 3.0.0b1

Yahoo! UI Library > event-custom > Do
Search:
Filters
Show Private Show Protected Show Deprecated

## `static` Class Do

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

### Properties

#### 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 )`
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

Returns: `string`
  handle for the subscription

#### before

`static string before ( fn , obj , sFn , c )`
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

Returns: `string`
  handle for the subscription

#### detach

`void detach ( handle )`
Detach a before or after subscription

Parameters:
  `handle <string>` the subscription handle

Returns: `void`

Copyright © 2009 Yahoo! Inc. All rights reserved.