query.js
No description.

File Location

arty/closure/goog/dojo/dom/query.js


Public Protected Private

Global Functions

function%167&attrs.$=()
No description.
code »
function%167&attrs.*=()
No description.
code »
function%167&attrs.=()
No description.
code »
function%167&attrs.^=()
No description.
code »
function%167&_childElements()
No description.
code »
function%167&_isDescendant()
No description.
code »
function%167&_isUnique()
No description.
code »
function%167&_lookLeft()
No description.
code »
function%167&_lookRight()
No description.
code »
function%167&_nodeUID()
No description.
code »
function%167&_zip()
No description.
code »
function%167&agree()
No description.
code »
function%167&pseudos.checked()
No description.
code »
function%167&pseudos.contains()
No description.
code »
function%167&defaultGetter()
No description.
code »
function%167&pseudos.empty()
No description.
code »
function%167&getQueryParts&endAll()
No description.
code »
function%167&getQueryParts&endClass()
No description.
code »
function%167&getQueryParts&endId()
No description.
code »
function%167&getQueryParts&endPart()
No description.
code »
function%167&getQueryParts&endTag()
No description.
code »
function%167&filterDown()
No description.
code »
function%167&pseudos.first-child()
No description.
code »
function%167&getArr(opt_arr)
No description.
Arguments:
opt_arr : Array=
No description.
code »
function%167&getAttr()
No description.
code »
function%167&getElementsFunc()
No description.
code »
function%167&getNodeIndex()
No description.
code »
function%167&getQueryFunc(opt_forceDOM)
No description.
Arguments:
opt_forceDOM : boolean=
No description.
code »
function%167&getQueryParts()
No description.
code »
function%167&getSimpleFilterFunc()
No description.
code »
function%167&getStepQueryFunc()
No description.
code »
function%167&getQueryParts¤tPart.getTag()
No description.
code »
function%167&isElement()
No description.
code »
function%167&isEven()
No description.
code »
function%167&isOdd()
No description.
code »
function%167&pseudos.last-child()
No description.
code »
function%167&nextSiblingIterator()
No description.
code »
function%167&nextSiblingsIterator()
No description.
code »
function%167&pseudos.not()
No description.
code »
function%167&pseudos.nth-child()
No description.
code »
function%167&pseudos.only-child()
No description.
code »
function%167&pseudos.nth-child&pi()
No description.
code »
goog.dom.query(queryopt_root) {length: number
This is an all-software query selector. Use document.querySelector. See https://developer.mozilla.org/en-US/docs/DOM/Document.querySelector . Returns nodes which match the given CSS3 selector, searching the entire document by default but optionally taking a node to scope the search by. dojo.query() is the swiss army knife of DOM node manipulation in Dojo. Much like Prototype's "$$" (bling-bling) function or JQuery's "$" function, dojo.query provides robust, high-performance CSS-based node selector support with the option of scoping searches to a particular sub-tree of a document. Supported Selectors: -------------------- dojo.query() supports a rich set of CSS3 selectors, including: * class selectors (e.g., `.foo`) * node type selectors like `span` * ` ` descendant selectors * `>` child element selectors * `#foo` style ID selectors * `*` universal selector * `~`, the immediately preceded-by sibling selector * `+`, the preceded-by sibling selector * attribute queries: | * `[foo]` attribute presence selector | * `[foo='bar']` attribute value exact match | * `[foo~='bar']` attribute value list item match | * `[foo^='bar']` attribute start match | * `[foo$='bar']` attribute end match | * `[foo*='bar']` attribute substring match * `:first-child`, `:last-child` positional selectors * `:empty` content empty selector * `:empty` content empty selector * `:nth-child(n)`, `:nth-child(2n+1)` style positional calculations * `:nth-child(even)`, `:nth-child(odd)` positional selectors * `:not(...)` negation pseudo selectors Any legal combination of these selectors will work with `dojo.query()`, including compound selectors ("," delimited). Very complex and useful searches can be constructed with this palette of selectors. Unsupported Selectors: ---------------------- While dojo.query handles many CSS3 selectors, some fall outside of what's reasonable for a programmatic node querying engine to handle. Currently unsupported selectors include: * namespace-differentiated selectors of any form * all `::` pseudo-element selectors * certain pseudo-selectors which don't get a lot of day-to-day use: | * `:root`, `:lang()`, `:target`, `:focus` * all visual and state selectors: | * `:root`, `:active`, `:hover`, `:visited`, `:link`, `:enabled`, `:disabled`, `:checked` * `:*-of-type` pseudo selectors dojo.query and XML Documents: ----------------------------- `dojo.query` currently only supports searching XML documents whose tags and attributes are 100% lower-case. This is a known limitation and will [be addressed soon] (http://trac.dojotoolkit.org/ticket/3866) Non-selector Queries: --------------------- If something other than a String is passed for the query, `dojo.query` will return a new array constructed from that parameter alone and all further processing will stop. This means that if you have a reference to a node or array or nodes, you can quickly construct a new array of nodes from the original by calling `dojo.query(node)` or `dojo.query(array)`. example: search the entire document for elements with the class "foo": | dojo.query(".foo"); these elements will match: | | |

example: search the entire document for elements with the classes "foo" *and* "bar": | dojo.query(".foo.bar"); these elements will match: | while these will not: | |

example: find `` elements which are descendants of paragraphs and which have a "highlighted" class: | dojo.query("p span.highlighted"); the innermost span in this fragment matches: |

| ... | ... | |

example: find all odd table rows inside of the table `#tabular_data`, using the `>` (direct child) selector to avoid affecting any nested tables: | dojo.query("#tabular_data > tbody > tr:nth-child(odd)");
Arguments:
query : string | Array
The CSS3 expression to match against. For details on the syntax of CSS3 selectors, see http://www.w3.org/TR/css3-selectors/#selectors.
opt_root : (string | Node)=
A Node (or node id) to scope the search from (optional).
Returns:  {length: number  } The elements that matched the query.
code »
function%167&query(queryroot) !Array
The main executor. Type specification from above.
Arguments:
query : string | Array
The query.
root : (string | Node)=
The root.
Returns: !Array  The elements that matched the query.
code »
function%167&getQueryParts&ts()
No description.
code »
function%167&attrs.|=()
No description.
code »
function%167&attrs.~=()
No description.
code »

Global Variables

function%167 :
No description.
Code »

Directory dom

File Reference