Properties Methods Events Direct Link

# Class Function

Package: | Global
Defined In: | Ext.js
Class: | Function
Extends: | Object

These functions are available on every Function object (any JavaScript function).

## Public Properties

This class has no public properties.

## Public Methods

Method | Defined By
--- | ---
| createCallback() : Function Creates a callback that passes arguments[0], arguments[1], arguments[2], ... Call directly on any function. Example: ... Creates a callback that passes arguments[0], arguments[1], arguments[2], ... Call directly on any function. Example: `myFunction.createCallback(myarg, myarg2)` Will create a function that is bound to those 2 args. Parameters: None. Returns: `Function` The new function | Function
| createDelegate( [`Object obj`], [`Array args`], [`Boolean/Number appendArgs`] ) : Function Creates a delegate (callback) that sets the scope to obj. Call directly on any function. Example: this.myFunction.cre... Creates a delegate (callback) that sets the scope to obj. Call directly on any function. Example: `this.myFunction.createDelegate(this)` Will create a function that is automatically scoped to this. Parameters: `obj` : Object (optional) The object for which the scope is set `args` : Array (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) `appendArgs` : Boolean/Number (optional) if True args are appended to call args instead of overriding, if a number the args are inserted at the specified position Returns: `Function` The new function | Function
| createInterceptor( `Function fcn`, [`Object scope`] ) : Function Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original ... Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called. The resulting function returns the results of the original function. The passed fcn is called with the parameters of the original function. @addon Parameters: `fcn` : Function The function to call before the original `scope` : Object (optional) The scope of the passed fcn (Defaults to scope of original function or window) Returns: `Function` The new function | Function
| createSequence( `Function fcn`, [`Object scope`] ) : Function Create a combined function call sequence of the original function + the passed function. The resulting function retur... Create a combined function call sequence of the original function + the passed function. The resulting function returns the results of the original function. The passed fcn is called with the parameters of the original function Parameters: `fcn` : Function The function to sequence `scope` : Object (optional) The scope of the passed fcn (Defaults to scope of original function or window) Returns: `Function` The new function | Function
| defer( `Number millis`, [`Object obj`], [`Array args`], [`Boolean/Number appendArgs`] ) : Number Calls this function after the number of millseconds specified. Calls this function after the number of millseconds specified. Parameters: `millis` : Number The number of milliseconds for the setTimeout call (if 0 the function is executed immediately) `obj` : Object (optional) The object for which the scope is set `args` : Array (optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) `appendArgs` : Boolean/Number (optional) if True args are appended to call args instead of overriding, if a number the args are inserted at the specified position Returns: `Number` The timeout id that can be used with clearTimeout | Function

## Public Events

This class has no public events.