YUI
(
o
)
- Parameters:
-
o <object>
Optional configuration object. Options:- ------------------------------------------------------------------------
- Global:
- ------------------------------------------------------------------------
- debug: Turn debug statements on or off
- useBrowserConsole: Log to the browser console if debug is on and the console is available
- logInclude: A hash of log sources that should be logged. If specified, only log messages from these sources will be logged.
- logExclude: A hash of log sources that should be not be logged. If specified, all sources are logged if not on this list.
- throwFail: If throwFail is set, Y.fail will generate or re-throw a JS error. Otherwise the failure is logged.
- win: The target window/frame
- core: A list of modules that defines the YUI core (overrides the default)
- ------------------------------------------------------------------------
- For event and get:
- ------------------------------------------------------------------------
- pollInterval: The default poll interval
- -------------------------------------------------------------------------
- For loader:
- -------------------------------------------------------------------------
- base: The base dir
- secureBase: The secure base dir (not implemented)
- comboBase: The YUI combo service base dir. Ex: http://yui.yahooapis.com/combo?
- root: The root path to prepend to module names for the combo service. Ex: 2.5.2/build/
- filter:
A filter to apply to result urls. This filter will modify the default
path for all modules. The default path for the YUI library is the
minified version of the files (e.g., event-min.js). The filter property
can be a predefined filter or a custom filter. The valid predefined
filters are:
- DEBUG
- Selects the debug versions of the library (e.g., event-debug.js). This option will automatically include the logger widget
- RAW
- Selects the non-minified version of the library (e.g., event.js).
myFilter: { 'searchExp': "-min\\.js", 'replaceStr': "-debug.js" }
- combine: Use the YUI combo service to reduce the number of http connections required to load your dependencies
- ignore: A list of modules that should never be dynamically loaded
- force: A list of modules that should always be loaded when required, even if already present on the page
- insertBefore: Node or id for a node that should be used as the insertion point for new nodes
- charset: charset for dynamic nodes
- timeout: number of milliseconds before a timeout occurs when dynamically loading nodes. in not set, there is no timeout
- context: execution context for all callbacks
- onSuccess: callback for the 'success' event
- onFailure: callback for the 'failure' event
- onTimeout: callback for the 'timeout' event
- onProgress: callback executed each time a script or css file is loaded
- modules: A list of module definitions. See Loader.addModule for the supported module metadata