selector-native.js revision 63942f7c9f6be91fe24a7b40e76d436847ec9b7b
(function(Y) {
/**
* The selector-native module provides support for native querySelector
* @module dom
* @submodule selector-native
* @for Selector
*/
/**
* Provides support for using CSS selectors to query the DOM
* @class Selector
* @static
* @for Selector
*/
var COMPARE_DOCUMENT_POSITION = 'compareDocumentPosition',
OWNER_DOCUMENT = 'ownerDocument',
TMP_PREFIX = 'yui-tmp-',
g_counter = 0;
var Selector = {
_reUnSupported: /!./g,
_foundCache: [],
_supportsNative: function() {
// whitelist and feature detection to manage
// future implementations manually
},
useNative: true,
i, len;
try {
} catch(e) { // IE: requires manual copy
ret = [];
}
}
}
return ret;
},
_clearFoundCache: function() {
i, len;
try { // IE no like delete
delete foundCache[i]._found;
} catch(e) {
}
}
foundCache = [];
},
var a = nodeA.sourceIndex,
b = nodeB.sourceIndex;
if (a === b) {
return 0;
} else if (a > b) {
return 1;
}
return -1;
return -1;
} else {
return 1;
}
} :
}
return compare;
}),
if (nodes) {
}
}
return nodes;
},
var ret = [],
i, node;
}
}
return ret;
},
// allows element scoped queries to begin with combinator
// e.g. query('> p', document.body) === query('body > p')
queries = [],
inDoc = true,
i, len;
if (root) {
if (!isDocRoot) {
// break into separate queries for element scoping
}
} else {
}
}
return queries;
},
}
i, query;
if (selector) {
ret = [];
try {
}
} catch(e) {
}
}
}
}
return ret;
},
var ret = [],
i, node;
}
}
} else {
}
return ret;
},
var ret = false,
item,
i, group;
}
if (ret) {
break;
}
}
}
return ret;
}
};
}
// allow standalone selector-native module
}
})(Y);