Provides support for using CSS selectors to query the DOM
ancestor
node
selector
testSelf
Defined in
dom/js/selector-native.js:361
A convenience method to emulate Y.Node's aNode.ancestor(selector).
node
HTMLElement
A node to start the query from.
selector
String
A CSS selector to test the node against.
testSelf
Boolean
optional Whether or not to include the node in the scan.
The ancestor node matching the selector, or null.
filter
nodes
selector
Defined in
dom/js/selector-native.js:263
Filters out nodes that do not match the given CSS selector.
nodes
HTMLElement[]
An array of nodes.
selector
String
A CSS selector to test each node against.
The nodes that matched the given CSS selector.
query
selector
root
firstOnly
Defined in
dom/js/selector-native.js:120
Retrieves a set of nodes based on a given CSS selector.
selector
String
A CSS selector.
root
HTMLElement
optional A node to start the query from. Defaults to Y.config.doc
.
firstOnly
Boolean
optional Whether or not to return only the first match.
The array of nodes that matched the given selector.
test
node
selector
root
Defined in
dom/js/selector-native.js:290
Determines whether or not the given node matches the given CSS selector.
node
HTMLElement
A node to test.
selector
String
A CSS selector to test the node against.
root
HTMLElement
optional A node to start the query from. Defaults to the parent document of the node.
Whether or not the given node matched the given CSS selector.
operators
Provided by the selector-css2 module.
Defined in
dom/js/selector-css2.js:40
List of operators and corresponding boolean functions. These functions are passed the attribute and the current node's value of the attribute.
shorthand
Provided by the selector-css2 module.
Defined in
dom/js/selector-css2.js:30
Mapping of shorthand tokens to corresponding attribute selector
useNative
Defined in
dom/js/selector-native.js:39
Use the native version of querySelectorAll
, if it exists.
Default: true