-<div xmlns:ext="http://www.extjs.com" class="body-wrap"><h1>Class <a href="source/DomQuery.html#cls-Ext.DomQuery">Ext.DomQuery</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info">DomQuery.js</td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/DomQuery.html#cls-Ext.DomQuery">DomQuery</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).\r
-<p>\r
-DomQuery supports most of the <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#selectors">CSS3 selectors spec</a>, along with some custom selectors and basic XPath.</p>\r
-\r
-<p>\r
-All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure.\r
-</p>\r
-<h4>Element Selectors:</h4>\r
-<ul class="list">\r
- <li> <b>*</b> any element</li>\r
- <li> <b>E</b> an element with the tag E</li>\r
- <li> <b>E F</b> All descendent elements of E that have the tag F</li>\r
- <li> <b>E > F</b> or <b>E/F</b> all direct children elements of E that have the tag F</li>\r
- <li> <b>E + F</b> all elements with the tag F that are immediately preceded by an element with the tag E</li>\r
- <li> <b>E ~ F</b> all elements with the tag F that are preceded by a sibling element with the tag E</li>\r
-</ul>\r
-<h4>Attribute Selectors:</h4>\r
-<p>The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.</p>\r
-<ul class="list">\r
- <li> <b>E[foo]</b> has an attribute "foo"</li>\r
- <li> <b>E[foo=bar]</b> has an attribute "foo" that equals "bar"</li>\r
- <li> <b>E[foo^=bar]</b> has an attribute "foo" that starts with "bar"</li>\r
- <li> <b>E[foo$=bar]</b> has an attribute "foo" that ends with "bar"</li>\r
- <li> <b>E[foo*=bar]</b> has an attribute "foo" that contains the substring "bar"</li>\r
- <li> <b>E[foo%=2]</b> has an attribute "foo" that is evenly divisible by 2</li>\r
- <li> <b>E[foo!=bar]</b> has an attribute "foo" that does not equal "bar"</li>\r
-</ul>\r
-<h4>Pseudo Classes:</h4>\r
-<ul class="list">\r
- <li> <b>E:first-child</b> E is the first child of its parent</li>\r
- <li> <b>E:last-child</b> E is the last child of its parent</li>\r
- <li> <b>E:nth-child(<i>n</i>)</b> E is the <i>n</i>th child of its parent (1 based as per the spec)</li>\r
- <li> <b>E:nth-child(odd)</b> E is an odd child of its parent</li>\r
- <li> <b>E:nth-child(even)</b> E is an even child of its parent</li>\r
- <li> <b>E:only-child</b> E is the only child of its parent</li>\r
- <li> <b>E:checked</b> E is an element that is has a checked attribute that is true (e.g. a radio or checkbox) </li>\r
- <li> <b>E:first</b> the first E in the resultset</li>\r
- <li> <b>E:last</b> the last E in the resultset</li>\r
- <li> <b>E:nth(<i>n</i>)</b> the <i>n</i>th E in the resultset (1 based)</li>\r
- <li> <b>E:odd</b> shortcut for :nth-child(odd)</li>\r
- <li> <b>E:even</b> shortcut for :nth-child(even)</li>\r
- <li> <b>E:contains(foo)</b> E's innerHTML contains the substring "foo"</li>\r
- <li> <b>E:nodeValue(foo)</b> E contains a textNode with a nodeValue that equals "foo"</li>\r
- <li> <b>E:not(S)</b> an E element that does not match simple selector S</li>\r
- <li> <b>E:has(S)</b> an E element that has a descendent that matches simple selector S</li>\r
- <li> <b>E:next(S)</b> an E element whose next sibling matches simple selector S</li>\r
- <li> <b>E:prev(S)</b> an E element whose previous sibling matches simple selector S</li>\r
- <li> <b>E:any(S1|S2|S2)</b> an E element which matches any of the simple selectors S1, S2 or S3//\\</li>\r
-</ul>\r
-<h4>CSS Value Selectors:</h4>\r
-<ul class="list">\r
- <li> <b>E{display=none}</b> css value "display" that equals "none"</li>\r
- <li> <b>E{display^=none}</b> css value "display" that starts with "none"</li>\r
- <li> <b>E{display$=none}</b> css value "display" that ends with "none"</li>\r
- <li> <b>E{display*=none}</b> css value "display" that contains the substring "none"</li>\r
- <li> <b>E{display%=2}</b> css value "display" that is evenly divisible by 2</li>\r
- <li> <b>E{display!=none}</b> css value "display" that does not equal "none"</li>\r
-</ul><br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.DomQuery-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.DomQuery-matchers"></a><b><a href="source/DomQuery.html#prop-Ext.DomQuery-matchers">matchers</a></b> : Object<div class="mdesc"><div class="short">Collection of matching regular expressions and code snippets.
-Each capture group within () will be replace the {} in...</div><div class="long">Collection of matching regular expressions and code snippets.\r
-Each capture group within () will be replace the {} in the select\r
-statement as specified by their index.</div></div></td><td class="msource">DomQuery</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.DomQuery-pseudos"></a><b><a href="source/DomQuery.html#prop-Ext.DomQuery-pseudos">pseudos</a></b> : Object<div class="mdesc"><div class="short">Object hash of "pseudo class" filter functions which are used when filtering selections. Each function is passed
-two...</div><div class="long"><p>Object hash of "pseudo class" filter functions which are used when filtering selections. Each function is passed\r
-two parameters:</p><div class="mdetail-params"><ul>\r
-<li><b>c</b> : Array<div class="sub-desc">An Array of DOM elements to filter.</div></li>\r
-<li><b>v</b> : String<div class="sub-desc">The argument (if any) supplied in the selector.</div></li>\r
-</ul></div>\r
-<p>A filter function returns an Array of DOM elements which conform to the pseudo class.</p>\r
-<p>In addition to the provided pseudo classes listed above such as <code>first-child</code> and <code>nth-child</code>,\r
-developers may add additional, custom psuedo class filters to select elements according to application-specific requirements.</p>\r
-<p>For example, to filter <code><a></code> elements to only return links to <i>external</i> resources:</p>\r
-<code><pre>\r
-Ext.DomQuery.pseudos.external = <b>function</b>(c, v){\r
- <b>var</b> r = [], ri = -1;\r
- <b>for</b>(<b>var</b> i = 0, ci; ci = c[i]; i++){\r
-<i>// Include <b>in</b> result set only <b>if</b> it<em>'s a link to an external resource\r</i>
- <b>if</b>(ci.hostname != location.hostname){\r
- r[++ri] = ci;\r
- }\r
- }\r
- <b>return</b> r;\r
-};</pre></code>\r
-Then external links could be gathered with the following statement:<code><pre>\r
+<div class="body-wrap" xmlns:ext="http://www.extjs.com"><div class="top-tools"><a class="inner-link" href="#Ext.DomQuery-props"><img src="resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> <a class="inner-link" href="#Ext.DomQuery-methods"><img src="resources/images/default/s.gif" class="item-icon icon-method">Methods</a> <a class="inner-link" href="#Ext.DomQuery-events"><img src="resources/images/default/s.gif" class="item-icon icon-event">Events</a> <a class="bookmark" href="../docs/?class=Ext.DomQuery"><img src="resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> </div><h1>Class <a href="source/DomQuery.html#cls-Ext.DomQuery">Ext.DomQuery</a></h1><table cellspacing="0"><tr><td class="label">Package:</td><td class="hd-info">Ext</td></tr><tr><td class="label">Defined In:</td><td class="hd-info"><a href="source/DomQuery.html#cls-Ext.DomQuery">DomQuery.js</a></td></tr><tr><td class="label">Class:</td><td class="hd-info"><a href="source/DomQuery.html#cls-Ext.DomQuery">DomQuery</a></td></tr><tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr></table><div class="description">Provides high performance selector/xpath processing by compiling queries into reusable functions. New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in).
+<p>
+DomQuery supports most of the <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/#selectors">CSS3 selectors spec</a>, along with some custom selectors and basic XPath.</p>
+
+<p>
+All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[@foo=bar].bar:first" would be a perfectly valid selector. Node filters are processed in the order in which they appear, which allows you to optimize your queries for your document structure.
+</p>
+<h4>Element Selectors:</h4>
+<ul class="list">
+ <li> <b>*</b> any element</li>
+ <li> <b>E</b> an element with the tag E</li>
+ <li> <b>E F</b> All descendent elements of E that have the tag F</li>
+ <li> <b>E > F</b> or <b>E/F</b> all direct children elements of E that have the tag F</li>
+ <li> <b>E + F</b> all elements with the tag F that are immediately preceded by an element with the tag E</li>
+ <li> <b>E ~ F</b> all elements with the tag F that are preceded by a sibling element with the tag E</li>
+</ul>
+<h4>Attribute Selectors:</h4>
+<p>The use of @ and quotes are optional. For example, div[@foo='bar'] is also a valid attribute selector.</p>
+<ul class="list">
+ <li> <b>E[foo]</b> has an attribute "foo"</li>
+ <li> <b>E[foo=bar]</b> has an attribute "foo" that equals "bar"</li>
+ <li> <b>E[foo^=bar]</b> has an attribute "foo" that starts with "bar"</li>
+ <li> <b>E[foo$=bar]</b> has an attribute "foo" that ends with "bar"</li>
+ <li> <b>E[foo*=bar]</b> has an attribute "foo" that contains the substring "bar"</li>
+ <li> <b>E[foo%=2]</b> has an attribute "foo" that is evenly divisible by 2</li>
+ <li> <b>E[foo!=bar]</b> attribute "foo" does not equal "bar"</li>
+</ul>
+<h4>Pseudo Classes:</h4>
+<ul class="list">
+ <li> <b>E:first-child</b> E is the first child of its parent</li>
+ <li> <b>E:last-child</b> E is the last child of its parent</li>
+ <li> <b>E:nth-child(<i>n</i>)</b> E is the <i>n</i>th child of its parent (1 based as per the spec)</li>
+ <li> <b>E:nth-child(odd)</b> E is an odd child of its parent</li>
+ <li> <b>E:nth-child(even)</b> E is an even child of its parent</li>
+ <li> <b>E:only-child</b> E is the only child of its parent</li>
+ <li> <b>E:checked</b> E is an element that is has a checked attribute that is true (e.g. a radio or checkbox) </li>
+ <li> <b>E:first</b> the first E in the resultset</li>
+ <li> <b>E:last</b> the last E in the resultset</li>
+ <li> <b>E:nth(<i>n</i>)</b> the <i>n</i>th E in the resultset (1 based)</li>
+ <li> <b>E:odd</b> shortcut for :nth-child(odd)</li>
+ <li> <b>E:even</b> shortcut for :nth-child(even)</li>
+ <li> <b>E:contains(foo)</b> E's innerHTML contains the substring "foo"</li>
+ <li> <b>E:nodeValue(foo)</b> E contains a textNode with a nodeValue that equals "foo"</li>
+ <li> <b>E:not(S)</b> an E element that does not match simple selector S</li>
+ <li> <b>E:has(S)</b> an E element that has a descendent that matches simple selector S</li>
+ <li> <b>E:next(S)</b> an E element whose next sibling matches simple selector S</li>
+ <li> <b>E:prev(S)</b> an E element whose previous sibling matches simple selector S</li>
+ <li> <b>E:any(S1|S2|S2)</b> an E element which matches any of the simple selectors S1, S2 or S3//\\</li>
+</ul>
+<h4>CSS Value Selectors:</h4>
+<ul class="list">
+ <li> <b>E{display=none}</b> css value "display" that equals "none"</li>
+ <li> <b>E{display^=none}</b> css value "display" that starts with "none"</li>
+ <li> <b>E{display$=none}</b> css value "display" that ends with "none"</li>
+ <li> <b>E{display*=none}</b> css value "display" that contains the substring "none"</li>
+ <li> <b>E{display%=2}</b> css value "display" that is evenly divisible by 2</li>
+ <li> <b>E{display!=none}</b> css value "display" that does not equal "none"</li>
+</ul><br><br><i>This class is a singleton and cannot be created directly.</i></div><div class="hr"></div><a id="Ext.DomQuery-props"></a><h2>Public Properties</h2><table cellspacing="0" class="member-table"><tbody><tr><th colspan="2" class="sig-header">Property</th><th class="msource-header">Defined By</th></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.DomQuery-matchers"></a><b><a href="source/DomQuery.html#prop-Ext.DomQuery-matchers">matchers</a></b> : Object<div class="mdesc"><div class="short">Collection of matching regular expressions and code snippets.
+Each capture group within () will be replace the {} in ...</div><div class="long">Collection of matching regular expressions and code snippets.
+Each capture group within () will be replace the {} in the select
+statement as specified by their index.</div></div></td><td class="msource">DomQuery</td></tr><tr class="property-row expandable "><td class="micon"><a href="#expand" class="exi"> </a></td><td class="sig"><a id="Ext.DomQuery-pseudos"></a><b><a href="source/DomQuery.html#prop-Ext.DomQuery-pseudos">pseudos</a></b> : Object<div class="mdesc"><div class="short">Object hash of "pseudo class" filter functions which are used when filtering selections. Each function is passed
+two ...</div><div class="long"><p>Object hash of "pseudo class" filter functions which are used when filtering selections. Each function is passed
+two parameters:</p><div class="mdetail-params"><ul>
+<li><b>c</b> : Array<div class="sub-desc">An Array of DOM elements to filter.</div></li>
+<li><b>v</b> : String<div class="sub-desc">The argument (if any) supplied in the selector.</div></li>
+</ul></div>
+<p>A filter function returns an Array of DOM elements which conform to the pseudo class.</p>
+<p>In addition to the provided pseudo classes listed above such as <code>first-child</code> and <code>nth-child</code>,
+developers may add additional, custom psuedo class filters to select elements according to application-specific requirements.</p>
+<p>For example, to filter <code><a></code> elements to only return links to <i>external</i> resources:</p>
+<code><pre>
+Ext.DomQuery.pseudos.external = <b>function</b>(c, v){
+ <b>var</b> r = [], ri = -1;
+ <b>for</b>(<b>var</b> i = 0, ci; ci = c[i]; i++){
+<i>// Include <b>in</b> result set only <b>if</b> it<em>'s a link to an external resource</i>
+ <b>if</b>(ci.hostname != location.hostname){
+ r[++ri] = ci;
+ }
+ }
+ <b>return</b> r;
+};</pre></code>
+Then external links could be gathered with the following statement:<code><pre>