+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
- <head>
- <meta http-equiv="content-type" content="text/html; charset=undefined" />
- <meta name="generator" content="JsDoc Toolkit" />
-
-
- <title>JsDoc Reference - Roo.DomQuery</title>
-
-
- <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
- <link rel="stylesheet" type="text/css" href="../default.css" />
-
-
- <script type="text/javascript" src="../page.js">
-
- </script>
-
-
- </head>
-
- <body onload="RooDocsPage.onload();">
-
-
-<div class="body-wrap">
-
- <!-- ============================== links to methods. ================================= -->
-
- <div class="top-tools">
- <!--
- <a class="inner-link" href="#Roo.DomQuery-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
- <a class="inner-link" href="#Roo.DomQuery-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
- <a class="inner-link" href="#Roo.DomQuery-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
- <a class="inner-link" href="#Roo.DomQuery-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
- <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
- -->
- </div>
-
-
-<!-- ============================== inheritance Block. ================================= -->
-
-<!-- ============================== class title / details ============================ -->
-
-
- <h1 class="classTitle">
-
- Class Roo.DomQuery
- </h1>
-
- <table cellspacing="0" class="class-summary-table">
-
- <tr><td class="label">Package:</td><td class="hd-info">Roo</td></tr>
-
- <tr><td class="label">Defined In:</td><td class="hd-info">
-
- <a href="./src/Roo_DomQuery.js.html">Roo/DomQuery.js</a>.
-
- </td></tr>
- <tr><td class="label">Class:</td><td class="hd-info">DomQuery</td></tr>
-
-
-
-
- </table>
-
-
-<!-- ============================== class summary ========================== -->
- <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).<br/><p><br/>DomQuery supports most of the <a href="http://www.w3.org/TR/2005/WD-css3-selectors-20051215/">CSS3 selectors spec</a>, along with some custom selectors and basic XPath.</p><br/><br/><p><br/>All selectors, attribute filters and pseudos below can be combined infinitely in any order. For example "div.foo:nth-child(odd)[<b>foo</b>=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.<br/></p><br/><h4>Element Selectors:</h4><br/><ul class="list"><br/> <li> <b>*</b> any element</li><br/> <li> <b>E</b> an element with the tag E</li><br/> <li> <b>E F</b> All descendent elements of E that have the tag F</li><br/> <li> <b>E > F</b> or <b>E/F</b> all direct children elements of E that have the tag F</li><br/> <li> <b>E + F</b> all elements with the tag F that are immediately preceded by an element with the tag E</li><br/> <li> <b>E ~ F</b> all elements with the tag F that are preceded by a sibling element with the tag E</li><br/></ul><br/><h4>Attribute Selectors:</h4><br/><p>The use of @ and quotes are optional. For example, div[<b>foo</b>='bar'] is also a valid attribute selector.</p><br/><ul class="list"><br/> <li> <b>E[foo]</b> has an attribute "foo"</li><br/> <li> <b>E[foo=bar]</b> has an attribute "foo" that equals "bar"</li><br/> <li> <b>E[foo^=bar]</b> has an attribute "foo" that starts with "bar"</li><br/> <li> <b>E[foo$=bar]</b> has an attribute "foo" that ends with "bar"</li><br/> <li> <b>E[foo*=bar]</b> has an attribute "foo" that contains the substring "bar"</li><br/> <li> <b>E[foo%=2]</b> has an attribute "foo" that is evenly divisible by 2</li><br/> <li> <b>E[foo!=bar]</b> has an attribute "foo" that does not equal "bar"</li><br/></ul><br/><h4>Pseudo Classes:</h4><br/><ul class="list"><br/> <li> <b>E:first-child</b> E is the first child of its parent</li><br/> <li> <b>E:last-child</b> E is the last child of its parent</li><br/> <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><br/> <li> <b>E:nth-child(odd)</b> E is an odd child of its parent</li><br/> <li> <b>E:nth-child(even)</b> E is an even child of its parent</li><br/> <li> <b>E:only-child</b> E is the only child of its parent</li><br/> <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><br/> <li> <b>E:first</b> the first E in the resultset</li><br/> <li> <b>E:last</b> the last E in the resultset</li><br/> <li> <b>E:nth(<i>n</i>)</b> the <i>n</i>th E in the resultset (1 based)</li><br/> <li> <b>E:odd</b> shortcut for :nth-child(odd)</li><br/> <li> <b>E:even</b> shortcut for :nth-child(even)</li><br/> <li> <b>E:contains(foo)</b> E's innerHTML contains the substring "foo"</li><br/> <li> <b>E:nodeValue(foo)</b> E contains a textNode with a nodeValue that equals "foo"</li><br/> <li> <b>E:not(S)</b> an E element that does not match simple selector S</li><br/> <li> <b>E:has(S)</b> an E element that has a descendent that matches simple selector S</li><br/> <li> <b>E:next(S)</b> an E element whose next sibling matches simple selector S</li><br/> <li> <b>E:prev(S)</b> an E element whose previous sibling matches simple selector S</li><br/></ul><br/><h4>CSS Value Selectors:</h4><br/><ul class="list"><br/> <li> <b>E{display=none}</b> css value "display" that equals "none"</li><br/> <li> <b>E{display^=none}</b> css value "display" that starts with "none"</li><br/> <li> <b>E{display$=none}</b> css value "display" that ends with "none"</li><br/> <li> <b>E{display*=none}</b> css value "display" that contains the substring "none"</li><br/> <li> <b>E{display%=2}</b> css value "display" that is evenly divisible by 2</li><br/> <li> <b>E{display!=none}</b> css value "display" that does not equal "none"</li><br/></ul>
- </div>
-
-
-<!-- ============================== Class comment block... ========================== -->
-
-<div class="comments">
- <b>Class Comments / Notes</B> =>
- <u onclick="parent.CommentDialog.showCommentId = 'Roo.DomQuery';">[Add Your comment/notes about this class]</u>
- <br/>
- <iframe frameborder="0" id="comments-Roo" style="border: none;width:100%;"
- src="/blog.php/GtkDjsComments/Roo.DomQuery.html"></iframe>
-</div>
-
-
-
-<!-- ============================== config options ========================== -->
-
-
-
-
- <div class="hr"></div>
- <a id="Roo.DomQuery-configs"></a>
-
-
-
- <table cellspacing="0" class="member-table">
- <caption class="Empty">Config Options - Has None</caption>
- </table>
-
-
-
-
-
-
-
-
-
-
-
-
- <!-- ============================== public properties ==================== -->
-
-
-
- <a id="Roo.DomQuery-props"></a>
-
-
-
-
-
- <table cellspacing="0" class="member-table">
- <caption class="Empty">Public Properties - Has None</caption>
- </table>
-
-
-
-
- <!-- ============================== methods summary / details ======================== -->
-
-
- <a id="Roo.DomQuery-methods"></a>
- <!-- constructor?? -->
-
- <!-- static's first
-
-
- -->
-
- <!-- then dynamics first -->
-
-
-
-
-
-
- <table cellspacing="0" class="member-table">
- <caption>Public Methods</caption>
- <tr>
- <th class="sig-header" colspan="2">Method</th>
- <th class="msource-header">Defined By</th>
-
- </tr>
-
-
-
-
-
-
-
- <tr class="method-row config-row-alt0 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="Roo.DomQuery-method-compile" name=".compile"></a>
- <div class="fixedFont">
- <span class="attributes">Roo.DomQuery.</span><b class="itemname">compile</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>type</i></B>)
-
-
- :
-
-
- <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Compiles a selector/xpath query into a reusable function.</div>
-
-
-
- <div class="long">
-
- Compiles a selector/xpath query into a reusable function. The returned function<br/>takes one parameter "root" (optional), which is the context node from where the query should start.
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
-
- </dt>
- <dd>The selector/xpath query</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>type</b>
-
- </dt>
- <dd>(optional) Either "select" (the default) or "simple" for a simple selector match</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> </dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- Roo.DomQuery
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt1 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="Roo.DomQuery-method-filter" name=".filter"></a>
- <div class="fixedFont">
- <span class="attributes">Roo.DomQuery.</span><b class="itemname">filter</b>
-
- (<a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a> <B><i>el</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a> <B><i>nonMatches</i></B>)
-
-
- :
-
-
- <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Filters an array of elements to only include matches of a simple selector (e.g.</div>
-
-
-
- <div class="long">
-
- Filters an array of elements to only include matches of a simple selector (e.g. div.some-class or span:first-child)
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> <b>el</b>
-
- </dt>
- <dd>An array of elements to filter</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
-
- </dt>
- <dd>The simple selector to test</dd>
-
- <dt>
- <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> <b>nonMatches</b>
-
- </dt>
- <dd>If true, it returns the elements that DON'T match<br/>the selector instead of the ones that match</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> </dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- Roo.DomQuery
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt0 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="Roo.DomQuery-method-is" name=".is"></a>
- <div class="fixedFont">
- <span class="attributes">Roo.DomQuery.</span><b class="itemname">is</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Array <B><i>el</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>)
-
-
- :
-
-
- <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Returns true if the passed element(s) match the passed simple selector (e.g.</div>
-
-
-
- <div class="long">
-
- Returns true if the passed element(s) match the passed simple selector (e.g. div.some-class or span:first-child)
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a>/HTMLElement/Array</span> <b>el</b>
-
- </dt>
- <dd>An element id, element or array of elements</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
-
- </dt>
- <dd>The simple selector to test</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a></span> </dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- Roo.DomQuery
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt1 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="Roo.DomQuery-method-select" name=".select"></a>
- <div class="fixedFont">
- <span class="attributes">Roo.DomQuery.</span><b class="itemname">select</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>, Node <B><i>root</i></B>)
-
-
- :
-
-
- <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Selects a group of elements.</div>
-
-
-
- <div class="long">
-
- Selects a group of elements.
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
-
- </dt>
- <dd>The selector/xpath query (can be a comma separated list of selectors)</dd>
-
- <dt>
- <span class="fixedFont">Node</span> <b>root</b>
-
- </dt>
- <dd>(optional) The start of the query (defaults to document).</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> </dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- Roo.DomQuery
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt0 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="Roo.DomQuery-method-selectNode" name=".selectNode"></a>
- <div class="fixedFont">
- <span class="attributes">Roo.DomQuery.</span><b class="itemname">selectNode</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>, Node <B><i>root</i></B>)
-
-
- :
-
-
- Element
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Selects a single element.</div>
-
-
-
- <div class="long">
-
- Selects a single element.
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
-
- </dt>
- <dd>The selector/xpath query</dd>
-
- <dt>
- <span class="fixedFont">Node</span> <b>root</b>
-
- </dt>
- <dd>(optional) The start of the query (defaults to document).</dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont">Element</span> </dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- Roo.DomQuery
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt1 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="Roo.DomQuery-method-selectNumber" name=".selectNumber"></a>
- <div class="fixedFont">
- <span class="attributes">Roo.DomQuery.</span><b class="itemname">selectNumber</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>, Node <B><i>root</i></B>, <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>defaultValue</i></B>)
-
-
- :
-
-
- <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
-
-
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Selects the value of a node, parsing integers and floats.</div>
-
-
-
- <div class="long">
-
- Selects the value of a node, parsing integers and floats.
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
-
- </dt>
- <dd>The selector/xpath query</dd>
-
- <dt>
- <span class="fixedFont">Node</span> <b>root</b>
-
- </dt>
- <dd>(optional) The start of the query (defaults to document).</dd>
-
- <dt>
- <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>defaultValue</b>
-
- </dt>
- <dd></dd>
-
- </dl>
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Returns:</dt>
-
- <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> </dd>
-
- </dl>
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- Roo.DomQuery
-
- </td>
- </tr>
-
-
- <tr class="method-row config-row-alt0 expandable notInherited">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
-
-
- <td class="sig">
- <a id="Roo.DomQuery-method-selectValue" name=".selectValue"></a>
- <div class="fixedFont">
- <span class="attributes">Roo.DomQuery.</span><b class="itemname">selectValue</b>
-
- (<a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>selector</i></B>, Node <B><i>root</i></B>, <a href="./String.html#constructor" roo:cls="String.html#constructor">String</a> <B><i>defaultValue</i></B>)
-
-
-
- </div>
- <div class="mdesc">
-
- <div class="short">Selects the value of a node, optionally replacing null with the defaultValue.</div>
-
-
-
- <div class="long">
-
- Selects the value of a node, optionally replacing null with the defaultValue.
-
-
-
-
-
-
- <dl class="detailList">
- <dt class="heading">Parameters:</dt>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>selector</b>
-
- </dt>
- <dd>The selector/xpath query</dd>
-
- <dt>
- <span class="fixedFont">Node</span> <b>root</b>
-
- </dt>
- <dd>(optional) The start of the query (defaults to document).</dd>
-
- <dt>
- <span class="fixedFont"><a href="./String.html#constructor" roo:cls="String.html#constructor">String</a></span> <b>defaultValue</b>
-
- </dt>
- <dd></dd>
-
- </dl>
-
-
-
-
-
-
-
-
-
-
-
- </div>
- </div>
-
- </td>
- <td class="msource">
-
- Roo.DomQuery
-
- </td>
- </tr>
-
-
- </table>
-
-
- <!-- ============================== events summary / details ======================== -->
-
-
- <a id="Roo.DomQuery-events"></a>
-
-
-
-
-
- <table cellspacing="0" class="member-table">
- <caption class="Empty">Events - Has None</caption>
- </table>
-
-
-
-
-
-
-
-
-
-<!-- ============================== footer ================================= -->
- <div class="fineprint" style="clear:both">
-
- Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT)
- Based on
- <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>
- </div>
- </body>
-</html>