# Yahoo! UI Library

### DataSource Utility 2.7.0

Yahoo! UI Library > datasource > YAHOO.util.FunctionDataSource
Search:
Filters Show Private Show Protected Show Deprecated

## Class YAHOO.util.FunctionDataSource - extends YAHOO.util.DataSourceBase

FunctionDataSource class for JavaScript functions.

### Constructor

YAHOO.util.FunctionDataSource `( oLiveData , oConfigs )`

Parameters:
  `oLiveData <HTMLElement>` Pointer to live data.
  `oConfigs <object>` (optional) Object literal of configuration values.

### Properties

#### scope - `Object`

Context in which to execute the function. By default, is the DataSource instance itself. If set, the function will receive the DataSource instance as an additional argument.
Default Value: null

#### Properties inherited from YAHOO.util.DataSourceBase:

`_aCache, _aIntervals, _oQueue, _sName, dataType, ERROR_DATAINVALID, ERROR_DATANULL, liveData, maxCacheEntries, parseJSONArgs, responseSchema, responseType, TYPE_HTMLTABLE, TYPE_JSARRAY, TYPE_JSFUNCTION, TYPE_JSON, TYPE_LOCAL, TYPE_SCRIPTNODE, TYPE_TEXT, TYPE_UNKNOWN, TYPE_XHR, TYPE_XML`

### Methods

#### makeConnection

`Number makeConnection ( oRequest , oCallback , oCaller )`
Overriding method passes query to a function. The returned response is then forwarded to the handleResponse function.

Parameters:
  `oRequest <Object>` Request object.
  `oCallback <Object>` Callback object literal.
  `oCaller <Object>` (deprecated) Use oCallback.scope.

Returns: `Number`
  Transaction ID.

#### Methods inherited from YAHOO.util.DataSourceBase:

`addToCache, clearAllIntervals, clearInterval, doBeforeCallback, doBeforeParseData, flushCache, getCachedResponse, handleResponse, isCacheHit, makeConnection, parseArrayData, parseData, parseHTMLTableData, parseJSONData, parseTextData, parseXMLData, parseXMLResult, sendRequest, setInterval, toString`

#### Events inherited from YAHOO.util.DataSourceBase:

`cacheFlushEvent, cacheRequestEvent, cacheResponseEvent, dataErrorEvent, requestEvent, responseCacheEvent, responseEvent, responseParseEvent,`

Copyright © 2009 Yahoo! Inc. All rights reserved.