yui-debug.js revision 22f764173ae182052991f514d1f82bfc2251968e
26N/A * This includes the script loading mechanism, a simple queue, and the core utilities for the library.
5123N/A handleLoad = function() {
5123N/A if (s.hasOwnProperty(i)) {
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,
if (!Env) {
Y.Env = {
_used: {},
_attached: {},
_loaded: {},
if (src) {
if (filter) {
debug: true,
useBrowserConsole: true,
throwFail: true,
bootstrap: true,
fetchCSS: true
_setup: function(o) {
core = [],
if (instance) {
m = instance;
m = m[nest[i]];
mod = {
for (i in instances) {
if (loader) {
name = r[i];
use: function() {
// this._attach( this.config.core || ['yui-base', 'get', 'intl-base', 'loader', 'yui-log', 'yui-later', 'yui-throttle']);
YArray = Y.Array,
missing = [],
star,
ret = true,
if (!skip) {
if (callback) {
success: true,
ret = true,
Y._loading = false;
if (data) {
missing = [];
if (redo) {
redo = false;
Y._loading = false;
if (data) {
if (ret) {
if (Y._loading) {
callback = null;
star = true;
// YUI.Env.loaders[Y.config._sig] = loader;
if (len) {
Y._loading = true;
onEnd: function(o) {
Y._loading = true;
handleBoot = function() {
Y._loading = false;
if (len) {
if (ret) {
handleLoader();
namespace: function() {
var a=arguments, o=null, i, j, d;
var Y = this, ret;
var uid;
if (!uid) {
if (!readOnly) {
uid = null;
return uid;
if (hasWin) {
handleLoad();
* A hash of log sources that should be logged. If specified, only log messages from these sources will be logged.
* 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
* This includes the script loading mechanism, a simple queue, and the core utilities for the library.
var L = Y.Lang,
TYPES = {
TRIMREGEX = /^\s+|\s+$/g,
SUBREGEX = /\{\s*([^\|\}]+?)\s*(?:\|([^\}]*))?\s*\}/g;
L.isArray = function(o) {
L.isBoolean = function(o) {
return typeof o === BOOLEAN;
L.isFunction = function(o) {
L.isDate = function(o) {
L.isNull = function(o) {
L.isNumber = function(o) {
L.isString = function(o) {
return typeof o === STRING;
L.isUndefined = function(o) {
return typeof o === UNDEFINED;
L.trim = function(s){
L.isValue = function(o) {
var t = L.type(o);
case NUMBER:
return isFinite(o);
case NULL:
case UNDEFINED:
L.type = function (o) {
L.sub = function (s, o) {
* This includes the script loading mechanism, a simple queue, and the core utilities for the library.
l = o.length;
Y.Array = YArray;
if (L.isObject(o)) {
if (L.isArray(o)) {
// indexed, but no tagName (element) or alert (window), or functions without apply/call (Safari HTMLElementCollection bug)
f.call(o || Y, a[i], i, a);
function(a, val) {
function(a, val) {
if (a[i] === val) {
var l = a.length, i;
if (f.call(o, a[i], i, a)) {
* This includes the script loading mechanism, a simple queue, and the core utilities for the library.
function Queue() {
this._init();
_init: function () {
this._q = [];
next: function () {
last: function () {
add: function () {
size: function () {
* This includes the script loading mechanism, a simple queue, and the core utilities for the library.
var L = Y.Lang,
_iefix = function(r, s) {
Y.merge = function() {
Y.mix(o, a[i], true);
* @param merge {boolean/int} merge objects instead of overwriting/ignoring. A value of 2
if (mode) {
switch (mode) {
var i, l, p, type;
p = wl[i];
if (s.hasOwnProperty(p)) {
Y.mix(r[p], s[p]);
} else if (ov || !(p in r)) {
if (s.hasOwnProperty(i)) {
} else if (ov || !(i in r)) {
_iefix(r, s);
return function(arg1) {
return cache[k];
* This includes the script loading mechanism, a simple queue, and the core utilities for the library.
F.prototype = o;
owns = function(o, k) {
if (owns(o, i)) {
if (count) {
out++;
return out;
O.keys = function(o) {
return _extract(o);
O.values = function(o) {
O.size = function(o) {
O.hasValue = function(o, v) {
f.call(s, o[i], i, o);
if (f.call(s, o[i], i, o)) {
return UNDEFINED;
p = Y.Array(path),
l = p.length;
p = Y.Array(path),
ref = o;
return UNDEFINED;
O.isEmpty = function(o) {
if (owns(o, i)) {
* This includes the script loading mechanism, a simple queue, and the core utilities for the library.
var numberify = function(s) {
mobile: null,
ios: null,
secure: false,
os: null
if (ua) {
L = Y.Lang,
Y.Get = function() {
queues = {},
for (i in attr) {
if (attributes) {
if (attributes) {
purge: function() {
if (q && q.onEnd) {
if (q.timer) {
if (q.onFailure) {
if (q.timer) {
q.finished = true;
if (q.aborted) {
if (q.onSuccess) {
if (q.onTimeout) {
if (q.timer) {
if (q.aborted) {
if (loaded) {
if (q.varName) {
if (q.varName) {
w = q.win;
d = w.document;
if (!url) {
if (q.timeout) {
}, q.timeout);
if (insertBefore) {
h.appendChild(n);
_autoPurge = function() {
if (purging) {
purging = true;
for (i in queues) {
q = queues[i];
delete queues[i];
purging = false;
_autoPurge();
finished: false,
nodes: []
n.onreadystatechange = function() {
n.onreadystatechange = null;
n.onload = function() {
n.onerror = function(e) {
n = q.nodes;
l = n.length;
if (insertBefore) {
h = s.parentNode;
node = n[i];
q.nodes = [];
setTimeout(function() {
abort: function(o) {
q.aborted = true;
* ["http://yui.yahooapis.com/2.5.2/build/yahoo/yahoo-min.js",
* "http://yui.yahooapis.com/2.5.2/build/event/event-min.js"], {
* // o.purge(); // optionally remove the script nodes immediately
* ["http://yui.yahooapis.com/2.3.1/build/menu/assets/skins/sam/menu.css",
* "http://yui.yahooapis.com/2.3.1/build/logger/assets/skins/sam/logger.css"], {
* insertBefore: 'custom-styles' // nodes will be inserted before the specified node
var tests = {};
if (cat_o) {
return result;
if (!feature) {
if (ua) {
return result;
/* This file is auto-generated by src/loader/meta_join.py */
v: Y.version,
url;
return url;
* The Intl utility provides a central location for managing sets of localized resources (strings and formatting patterns).
var SPLIT_REGEX = /[, ]/;
return availableLanguages[i];
if (result) {
return result;
var INSTANCE = Y,
Y = INSTANCE,
c = Y.config,
if (c.debug) {
if (src) {
if (!bail) {
if (c.useBrowserConsole) {
console[f](m);
* Provides a setTimeout/setInterval wrapper
var L = Y.Lang,
m = o[fn];
d = Y.Array(data);
m.apply(o, d) ;
m.call(o);
cancel: function() {
if (this.interval) {
* globally with Y.config.throttleTime or by call. Passing a -1 will disable the throttle. Defaults to 150
/*! Based on work by Simon Willison: http://gist.github.com/292562 */