yui-core.js revision fd6e0c106ef55f46bcc11b2161d7c6fa24110fda
3181N/Aare store in Y.config. See <a href="config.html">Config</a> for the list of supported
var YUI = function() {
Y = new YUI();
Y._init();
if (gconf) {
Y._setup();
Y._setup();
NOOP = function() {},
instances = {},
} catch (ex) {}
handleLoad = function() {
if (hasWin) {
getLoader = function(Y, o) {
if (loader) {
//loader._config(Y.config);
YUI.Env.core = Y.Array.dedupe([].concat(YUI.Env.core, [ 'loader-base', 'loader-rollup', 'loader-yui3' ]));
return loader;
clobber = function(r, s) {
if (s.hasOwnProperty(i)) {
if (docClass) {
proto = {
* update the loader cache if necessary. Updating Y.config directly
applyConfig: function(o) {
o = o || NOOP;
var attr,
name,
for (name in o) {
if (loader) {
_config: function(o) {
this.applyConfig(o);
_init: function() {
var filter,
prop;
if (!Env) {
Y.Env = {
_used: {},
_attached: {},
_missed: [],
_loaded: {},
// so "yui/yui-min", "yui/yui-debug", "yui-base/yui-base-debug". NOT "yui/yui-tshirt".
// 4. This is followed by ".js", so "yui/yui.js", "simpleyui/simpleyui-min.js"
// "blah?foo/yui/yui.js" will capture "foo/" and "blah?some/thing.js&3.3.0/build/yui-davglass/yui-davglass.js"
if (match) {
path = {
return path;
function(pattern) {
if (src) {
if (parsed) {
return path;
debug: true,
useBrowserConsole: true,
throwFail: true,
bootstrap: true,
cacheUse: true,
fetchCSS: true
_setup: function(o) {
core = [],
//extras = Y.config.core || ['get','intl-base'];
if (Y.Loader) {
getLoader(Y);
if (instance) {
m = instance;
m = m[nest[i]];
mod = {
for (i in instances) {
if (loader) {
name = r[i];
if (go) {
if (!done[r[i]]) {
name = r[i];
if (!mod) {
moot = true;
if (!moot) {
if (req) {
if (after) {
if (use) {
use: function() {
name,
provisioned = true;
callback = null;
provisioned = false;
if (provisioned) {
if (Y._loading) {
* Notify handler from Loader for attachment/load errors
* @param callback {Function} The callback to pass to the `Y.config.loadErrorFn`
} else if (callback) {
YArray = Y.Array,
missing = [],
ret = true,
if (!skip) {
success: true,
ret = true,
Y._loading = false;
if (data) {
missing = [];
if (redo) {
redo = false;
Y._loading = false;
if (data) {
if (ret) {
if (ret) {
handleLoader();
if (len) {
Y._loading = true;
Y._loading = true;
handleBoot = function() {
Y._loading = false;
if (ret) {
handleLoader();
namespace: function() {
for (; i < a.length; i++) {
arg = a[i];
var Y = this, ret;
var uid;
if (!uid) {
if (!readOnly) {
uid = null;
return uid;
destroy: function() {
if (Y.Event) {
delete Y.Env;
delete Y.config;
if (hasWin) {
handleLoad();
* The YUI combo service base dir. Ex: `http://yui.yahooapis.com/combo?`
* minified version of the files (e.g., event-min.js). The filter property
* <dd>Selects the debug versions of the library (e.g., event-debug.js).
* <dd>Selects the non-minified version of the library (e.g., event.js).</dd>
* 'replaceStr': "-debug.js"
* fullpath: 'http://myserver.mydomain.com/mymod1/mymod1.js'
* fullpath: 'http://myserver.mydomain.com/mymod2/mymod2.js'
* base: 'http://yui.yahooapis.com/2.8.0r4/build/',
* comboBase: 'http://yui.yahooapis.com/combo?',
* path: "yahoo-dom-event/yahoo-dom-event.js"
* path: "animation/animation.js",
* @default loader/loader-min.js
TYPES = {
SUBREGEX = /\{\s*([^|}]+?)\s*(?:\|([^}]*))?\s*\}/g,
TRIMREGEX = /^\s+|\s+$/g,
L.isBoolean = function(o) {
L.isFunction = function(o) {
L.isDate = function(o) {
L.isNull = function(o) {
L.isNumber = function(o) {
L.isString = function(o) {
L.isUndefined = function(o) {
return s.trimLeft();
return s.trimRight();
L.isValue = function(o) {
var t = L.type(o);
return isFinite(o);
L.type = function(o) {
L.sub = function(s, o) {
return new Date().getTime();
} catch (ex) {
result = [];
return result;
return [thing];
Y.Array = YArray;
var hash = {},
results = [],
return results;
if (i in array) {
var hash = {},
i, len;
if (i in keys) {
return hash;
} catch (ex) {}
return result;
function Queue() {
this._init();
_init: function() {
this._q = [];
next: function() {
last: function() {
add: function() {
size: function() {
return function (arg) {
String(arg);
Y.merge = function () {
result = {};
for (; i < len; ++i) {
return result;
return receiver || Y;
if (mode) {
return receiver;
if (whitelist) {
if (Y.Object._hasEnumBug) {
return receiver;
return function (obj) {
* - <https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug>
var keys = [],
if (hasEnumBug) {
return keys;
values = [];
for (; i < len; ++i) {
return values;
} catch (ex) {
var key;
var key;
return UNDEFINED;
p = Y.Array(path),
l = p.length;
p = Y.Array(path),
ref = o;
return UNDEFINED;
var numberify = function(s) {
mobile: null,
ios: null,
secure: false,
os: null,
if (ua) {
o.ios = m;
if (!subUA) {
"anim": ["anim-base","anim-color","anim-curve","anim-easing","anim-node-plugin","anim-scroll","anim-xy"],
"autocomplete": ["autocomplete-base","autocomplete-sources","autocomplete-list","autocomplete-plugin"],
"dataschema": ["dataschema-base","dataschema-json","dataschema-xml","dataschema-array","dataschema-text"],
"datasource": ["datasource-local","datasource-io","datasource-get","datasource-function","datasource-cache","datasource-jsonschema","datasource-xmlschema","datasource-arrayschema","datasource-textschema","datasource-polling"],
"dd": ["dd-ddm-base","dd-ddm","dd-ddm-drop","dd-drag","dd-proxy","dd-constrain","dd-drop","dd-scroll","dd-delegate"],
"editor": ["frame","selection","exec-command","editor-base","editor-para","editor-br","editor-bidi","editor-tab","createlink-base"],