Yui3 config description

Source: Internet
Author: User
/**
* The Config object contains all of the configuration options
* The Yui instance. This object is supplied by the implementer
* When instantiating a Yui instance. Some properties have default
* Values if they are not supplied by the implementer. This shold
* Not be updated directly because some values are cached. Use
* Applyconfig () to update the config object on a Yui instance that
* Has already been configured.
*
* @ Class config
* @ Static
*/

/**
* Allows the Yui seed file to fetch the loader component and Library
* Metadata to dynamically load additional dependencies.
*
* @ Property Bootstrap
* @ Type boolean
* @ Default true
*/

/**
* Log to the browser console If debug is on and the browser has
* Supported console.
*
* @ Property usebrowserconsole
* @ Type boolean
* @ Default true
*/

/**
* A hash of log sources that shocould be logged. If specified, only
* Log messages from these sources will be logged.
*
* @ Property loginclude
* @ Type object
*/

/**
* A hash of log sources that shocould be not be logged. If specified,
* All sources are logged if not on this list.
*
* @ Property logexclude
* @ Type object
*/

/**
* Set to true if the Yui seed file was dynamically loaded in
* Order to bootstrap components relying on the window load event
* And the 'domainready' m event.
*
* @ Property injected
* @ Type boolean
* @ Default false
*/

/**
* If throwfail is set, Y. error will generate or re-throw a JS error.
* Otherwise the failure is logged.
*
* @ Property throwfail
* @ Type boolean
* @ Default true
*/

/**
* The Window/frame that this instance shoshould operate in.
*
* @ Property win
* @ Type window
* @ Default the window hosting Yui
*/

/**
* The document associated with the 'win' configuration.
*
* @ Property Doc
* @ Type document
* @ Default the document hosting Yui
*/

/**
* A list of modules that defines the Yui core (overrides the default ).
*
* @ Property Core
* @ Type string []
*/

/**
* A list of versions in order of preference. This list is matched against
* The list of available languages in modules that the Yui instance uses
* Determine the best possible localization of language sensitive modules.
* Ages are represented using BCP 47 Language tags, such as "En-GB"
* English as used in the United Kingdom, or "ZH-Hans-CN" for simplified
* Chinese as used in China. The list can be provided as a comma-separated
* List or as an array.
*
* @ Property Lang
* @ Type string | string []
*/

/**
* The default date format
* @ Property dateformat
* @ Type string
* @ Deprecated use configuration in datatype. Date. Format () instead.
*/

/**
* The default locale
* @ Property locale
* @ Type string
* @ Deprecated use config. Lang instead.
*/

/**
* The default interval when polling in milliseconds.
* @ Property pollinterval
* @ Type int
* @ Default 20
*/

/**
* The number of dynamic nodes to insert by default before
* Automatically removing them. This applies to script nodes
* Because remove the node will not make the evaluated script
* Unavailable. Dynamic CSS is not auto purged, because removing
* A linked style sheet will also remove the style definitions.
* @ Property purgethreshold
* @ Type int
* @ Default 20
*/

/**
* The default interval when polling in milliseconds.
* @ Property windowresizedelay
* @ Type int
* @ Default 40
*/

/**
* Base directory for Dynamic Loading
* @ Property base
* @ Type string
*/

/*
* The secure base Dir (not implemented)
* For dynamic loading.
* @ Property securebase
* @ Type string
*/

/**
* The Yui combo service base dir. Ex: http://yui.yahooapis.com/combo?
* For dynamic loading.
* @ Property combobase
* @ Type string
*/

/**
* The root path to prepend to module path for the combo service.
* Ex: 3.0.0b1/build/
* For dynamic loading.
* @ Property Root
* @ Type string
*/

/**
* 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
* 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:
* <DL>
* <DT> debug </DT>
* <DD> selects the DEBUG Versions of the Library (e.g., event-debug.js ).
* This option will automatically include the logger widget </DD>
* <DT> raw </DT>
* <DD> selects the non-minified version of the Library (e.g., event. JS). </DD>
* </Dl>
* You can also define a custom filter, which must be an object literal
* Containing a search expression and a replace string:
* <PRE>
* Myfilter: & #123;
* 'Searchexp': "-min \. js ",
* 'Replace R': "-Debug. js"
* & #125;
* </PRE>
*
* For dynamic loading.
*
* @ Property Filter
* @ Type string | object
*/

/**
* The 'skin' config let's you configure application level skin
* Customizations. It contains the following attributes which
* Can be specified to override the defaults:
*
* // The default skin, which is automatically applied if not
* // Overriden by a component-specific skin definition.
* // Change this in to apply a different skin globally
* Defaultskin: 'Sam ',
*
* // This is combined with the loader base property to get
* // The default root directory for a skin.
* Base: 'Assets/skins /',
*
* // Any component-specific overrides can be specified here,
* // Making it possible to load different skins for different
* // Components. It is possible to load more than one skin
* // For a given component as well.
* Overrides :{
* Slider: ['capacity', 'round']
*}
*
* For dynamic loading.
*
* @ Property skin
*/

/**
* Hash of per-component Filter specification. If specified for a given
* Component, this overrides the filter config.
*
* For dynamic loading.
*
* @ Property Filters
*/

/**
* Use the Yui combo service to reduce the number of HTTP connections
* Required to load your dependencies. Turning this off will
* Disable combo handling for Yui and all module groups configured
* With a combo service.
*
* For dynamic loading.
*
* @ Property combine
* @ Type boolean
* @ Default true if 'base' is not supplied, false if it is.
*/

/**
* A list of modules that shoshould never be dynamically loaded
*
* @ Property ignore
* @ Type string []
*/

/**
* A list of modules that shoshould always be loaded when required, even if already
* Present on the page.
*
* @ Property force
* @ Type string []
*/

/**
* Node or ID for a node that shoshould be used as the insertion point for new
* Nodes. For dynamic loading.
*
* @ Property insertbefore
* @ Type string
*/

/**
* Object literal containing attributes to add to Dynamically Loaded script
* Nodes.
* @ Property jsattributes
* @ Type string
*/

/**
* Object literal containing attributes to add to Dynamically Loaded Link
* Nodes.
* @ Property cssattributes
* @ Type string
*/

/**
* Number of milliseconds before a timeout occurs when dynamically
* Loading nodes. If not set, there is no timeout.
* @ Property timeout
* @ Type int
*/

/**
* Callback for the 'csscomplete' event. When dynamically loading Yui
* Components with CSS, this property fires when the CSS is finished
* Loading but Script Loading is still ongoing. This provides
* Opportunity to enhance the presentation of a loading page a little
* Bit before the entire loading process is done.
*
* @ Property oncss
* @ Type Function
*/

/**
* A hash of module definitions to add to the list of Yui components.
* These components can then be dynamically loaded side by side
* Yui via the use () method. This is a hash, the key is the module
* Name, and the value is an object literal specifying the metdata
* For the module. * See loader. addmodule for the supported Module
* Metadata fields. Also @ see groups, which provides a way
* Configure the base and combo spec for a set of modules.
* <Code>
* Modules :{
* & Nbsp; mymod1 :{
* & Nbsp; requires: ['node'],
* & Nbsp; fullpath: 'http: // myserver.mydomain.com/mymod1/mymod1.js'
* & Nbsp ;},
* & Nbsp; mymod2 :{
* & Nbsp; requires: ['mymod1'],
* & Nbsp; fullpath: 'http: // myserver.mydomain.com/mymod2/mymod2.js'
* & Nbsp ;}
*}
* </Code>
*
* @ Property modules
* @ Type object
*/

/**
* A hash of module group definitions. It for each group you
* Can specify a list of modules and the base path and
* Combo spec to use when dynamically loading the modules. @ see
* @ See modules for the details about the modules part of
* Group definition.
* <Code>
* & Nbsp; groups :{
* & Nbsp; yui2 :{
* & Nbsp; // specify whether or not this group has a combo Service
* & Nbsp; Combine: True,
* & Nbsp;
* & Nbsp; // The base path for non-combo paths
* & Nbsp; base: 'http: // yui.yahooapis.com/2.8.0r4/build /',
* & Nbsp;
* & Nbsp; // The Path to the combo Service
* & Nbsp; combobase: 'http: // yui.yahooapis.com/combo? ',
* & Nbsp;
* & Nbsp; // a fragment to prepend to the path attribute when
* & Nbsp; // when building combo URLs
* & Nbsp; root: '2. 8.0r4/build /',
* & Nbsp;
* & Nbsp; // The module Definitions
* & Nbsp; Modules :{
* & Nbsp; yui2_yde :{
* & Nbsp; Path: "yahoo-dom-event/yahoo-dom-event.js"
* & Nbsp ;},
* & Nbsp; yui2_anim :{
* & Nbsp; Path: "animation/animation. js ",
* & Nbsp; requires: ['yui2 _ yde']
* & Nbsp ;}
* & Nbsp ;}
* & Nbsp ;}
* & Nbsp ;}
* </Code>
* @ Property modules
* @ Type object
*/

/**
* The loader 'path' attribute to the loader itself. This is combined
* With the 'base' attribute to dynamically load the loader component
* When boostrapping with the get utility alone.
*
* @ Property loaderpath
* @ Type string
* @ Default loader/loader-min.js
*/

/**
* Specifies whether or not Yui (). Use (...) will attempt to load CSS
* Resources at all. Any truthy value will cause CSS Dependencies
* To load when fetching script. The special value 'force' will
* Cause CSS dependencies to be loaded even if no script is needed.
*
* @ Property fetchcss
* @ Type boolean | string
* @ Default true
*/

/**
* The default gallery version to build gallery module URLs
* @ Property Gallery
* @ Type string
* @ Since 3.1.0
*/

/**
* The default Yui 2 version to build yui2 module URLs. This is
* Intrinsic Yui 2 support via the 2in3 project. Also @ see the '2in3'
* Config for pulling different revisions of the wrapped Yui 2
* Modules.
* @ Since 3.1.0
* @ Property yui2
* @ Type string
* @ Default 2.8.1
*/

/**
* The 2in3 Project is a deployment of the various versions of Yui 2
* Deployed as first-class Yui 3 modules. Eventually, the wrapper
* For the modules will change (but the underlying Yui 2 code will
* Be the same), and you can select a particle version
* The wrapper modules via this config.
* @ Since 3.1.0
* @ Property 2in3
* @ Type string
* @ Default 1
*/

/**
* Alternative console log function for use in environments
* A supported native console. The function is executed in
* Yui instance context.
* @ Since 3.1.0
* @ Property logfn
* @ Type Function
*/

/**
* A callback to execute when Y. error is called. It records es
* Error message and an JavaScript error object if y. error was
* Executed because a javascript error was caught. The function
* Is executed in the Yui instance context.
*
* @ Since 3.2.0
* @ Property errorfn
* @ Type Function
*/

/**
* A callback to execute when the loader fails to load one or
* More resource. This cocould be because of a script Load
* Failure. It can also fail if a javascript module fails
* To register itself, but only when the 'requireregistration'
* Is true. If this function is defined, the use () callback will
* Only be called when the loader succeeds, otherwise it always
* Executes unless there was a javascript error when attaching
* A module.
*
* @ Since 3.3.0
* @ Property loaderrorfn
* @ Type Function
*/

/**
* When set to true, the Yui loader will perform CT that all modules
* It is responsible for loading will be first-class Yui modules
* That register themselves with the Yui global. If this is
* Set to true, loader will fail if the module regiils fails
* To happen after the script is loaded.
*
* @ Since 3.3.0
* @ Property requireregistration
* @ Type boolean
* @ Default false
*/

/**
* Cache serviced use () requests.
* @ Since 3.3.0
* @ Property cacheuse
* @ Type boolean
* @ Default true
*/

/**
* The parameter defaults for the remote Loader service.
* Requires the RLS submodule. the properties that are
* Supported:
* <PRE>
* M: comma separated list of module requirements. This
* Must Be The param name even for custom implemetations.
* V: The version of Yui to load. defaults to the version
* Of Yui that is being used.
* GV: the version of the gallery to load (@ see the gallery config)
* Env: comma separated list of modules already on the page.
* This Must Be The param name even for custom implemetations.
* LANG: The supported ages supported on the page (@ see the Lang config)
* '2in3v': the version of the 2in3 wrapper to use (@ see the 2in3 config ).
* '2v': the version of yui2 to use in the Yui 2in3 wrappers
* (@ See the yui2 config)
* Filt: A filter def to apply to the URLs (@ see the filter config ).
* Filts: A list of custom filters to apply per module
* (@ See the filters config ).
* Tests: this is a map of conditional module test function ID keys
* With the values of 1 if the test passes, 0 if not. This must be
* The Name Of The querystring Param in custom templates.
* </PRE>
*
* @ Since 3.2.0
* @ Property RLS
*/

/**
* The base path to the remote Loader service
*
* @ Since 3.2.0
* @ Property rls_base
*/

/**
* The template to use for building the querystring portion
* Of the remote Loader service URL. The default is determined
* By the RLS config -- each property that has a value will be
* Represented.
*
* Ex: M = {m} & V = {v} & Env = {env} & lang = {Lang} & filt = {filt} & tests = {tests}
*
*
* @ Since 3.2.0
* @ Property rls_tmpl
*/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.