selenium-webdriver
Version:
The official WebDriver JavaScript bindings from the Selenium project
106 lines (97 loc) • 106 kB
HTML
<!DOCTYPE html><meta charset="UTF-8"><meta http-equiv="Content-Language" content="en" /><title>goog.dom</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Namespace goog.dom</h1><a class="source" href="source/lib/goog/dom/nodetype.js.src.html#l19">code »</a></header><section></section><section><h2>Classes</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="class_goog_dom_DomHelper.html">goog.dom.DomHelper</a><dd>Create an instance of a DOM helper with a new document object.</dl></table></div></section><section><h2>Enumerations</h2><div class="type-summary"><table><tbody><tr><td><dl><dt><a href="enum_goog_dom_BrowserFeature.html">goog.dom.BrowserFeature</a><dd>Enum of browser capabilities.<dt><a href="enum_goog_dom_NodeType.html">goog.dom.NodeType</a><dd>Constants for the nodeType attribute in the Node interface.<dt><a href="enum_goog_dom_TagName.html">goog.dom.TagName</a><dd>Enum of all html tag names specified by the W3C HTML4.01 and HTML5
specifications.</dl></table></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="typedefs"><h2>Type Definitions</h2><div class="wrap-details public"><div><details><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l2341">code »</a><a class="member" name="goog.dom.Appendable">goog.dom.Appendable</a> : <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177">NodeList</a>)</code></div><div>Typedef for use with goog.dom.createDom and goog.dom.append.</div></summary></details></div></div></section><section id="static-functions"><h2>Global Functions</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l167">code »</a><span class="member deprecation-notice"><a name="goog.dom.$">goog.dom.$</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Use <code class="type"><a href="namespace_goog_dom.html#goog.dom.getElement">goog.dom.getElement</a></code> instead.</span></div><p>Alias for getElement.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>)</code><dd>Element ID or a DOM node.</dl><tr><th>Returns<tr><td><dl>The element with the given ID, or the node passed in.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l343">code »</a><span class="member deprecation-notice"><a name="goog.dom.$$">goog.dom.$$</a> <span class="args">( opt_tag, opt_class, opt_el )</span> ⇒ <code class="type">{length: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}</code></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Use <code class="type"><a href="namespace_goog_dom.html#goog.dom.getElementsByTagNameAndClass">goog.dom.getElementsByTagNameAndClass</a></code> instead.</span></div><p>Alias for <code >getElementsByTagNameAndClass</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_tag: <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>Element tag name.<dt>opt_class: <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>Optional class name.<dt>opt_el: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>=</code><dd>Optional element to look in.</dl><tr><th>Returns<tr><td><dl>Array-like list of elements (only a length
property and numerical indices are guaranteed to exist).</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l791">code »</a><span class="member deprecation-notice"><a name="goog.dom.$dom">goog.dom.$dom</a> <span class="args">( tagName, opt_attributes, var_args )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><div class="deprecation-notice">Deprecated: <span class="deprecation-reason">Use <code class="type"><a href="namespace_goog_dom.html#goog.dom.createDom">goog.dom.createDom</a></code> instead.</span></div><p>Alias for <code >createDom</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>tagName: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Tag to create.<dt>opt_attributes: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>)=</code><dd>If object, then a map of name-value
pairs for attributes. If a string, then this is the className of the new
element.<dt>var_args: <code class="type">...(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177">NodeList</a>)</code><dd>Further DOM nodes or
strings for text nodes. If one of the var_args is an array, its
children will be added as childNodes instead.</dl><tr><th>Returns<tr><td><dl>Reference to a DOM node.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1004">code »</a><span class="member"><a name="goog.dom.append">goog.dom.append</a> <span class="args">( parent, var_args )</span></span></div><p>Appends a node with text or other nodes.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>parent: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The node to append nodes to.<dt>var_args: <code class="type">...<a href="namespace_goog_dom.html#goog.dom.Appendable">goog.dom.Appendable</a></code><dd>The things to append to the node.
If this is a Node it is appended as is.
If this is a string then a text node is appended.
If this is an array like object then fields 0 to length - 1 are appended.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l991">code »</a><span class="member"><a name="goog.dom.appendChild">goog.dom.appendChild</a> <span class="args">( parent, child )</span></span></div><p>Appends a child to a node.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>parent: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>Parent.<dt>child: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>Child.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l754">code »</a><span class="member"><a name="goog.dom.append_">goog.dom.append_</a> <span class="args">( doc, parent, args, startIndex )</span></span></div><p>Appends a node with text or other nodes.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>doc: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a></code><dd>The document to create new nodes in.<dt>parent: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The node to append nodes to.<dt>args: <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments">Arguments</a></code><dd>The values to add. See <code >goog.dom.append</code>.<dt>startIndex: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The index of the array to start from.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l950">code »</a><span class="member"><a name="goog.dom.canHaveChildren">goog.dom.canHaveChildren</a> <span class="args">( node )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Determines if the given node can contain children, intended to be used for
HTML generation.
IE natively supports node.canHaveChildren but has inconsistent behavior.
Prior to IE8 the base tag allows children and in IE9 all nodes return true
for canHaveChildren.
In practice all non-IE browsers allow you to add children to any node, but
the behavior is inconsistent:
<pre>
var a = document.createElement('br');
a.appendChild(document.createTextNode('foo'));
a.appendChild(document.createTextNode('bar'));
console.log(a.childNodes.length); // 2
console.log(a.innerHTML); // Chrome: "", IE9: "foobar", FF3.5: "foobar"
</pre>
For more information, see:
http://dev.w3.org/html5/markup/syntax.html#syntax-elements
TODO(user): Rename shouldAllowChildren() ?</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>node: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The node to check.</dl><tr><th>Returns<tr><td><dl>Whether the node can contain children.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l263">code »</a><span class="member"><a name="goog.dom.canUseQuerySelector_">goog.dom.canUseQuerySelector_</a> <span class="args">( parent )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Prefer the standardized (http://www.w3.org/TR/selectors-api/), native and
fast W3C Selectors API.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>parent: <code class="type">!(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a>)</code><dd>The parent document object.</dl><tr><th>Returns<tr><td><dl>whether or not we can use parent.querySelector* APIs.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1352">code »</a><span class="member"><a name="goog.dom.compareNodeOrder">goog.dom.compareNodeOrder</a> <span class="args">( node1, node2 )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Compares the document order of two nodes, returning 0 if they are the same
node, a negative number if node1 is before node2, and a positive number if
node2 is before node1. Note that we compare the order the tags appear in the
document so in the tree <b><i>text</i></b> the B node is considered to be
before the I node.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>node1: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The first node to compare.<dt>node2: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The second node to compare.</dl><tr><th>Returns<tr><td><dl>0 if the nodes are the same node, a negative number if node1
is before node2, and a positive number if node2 is before node1.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1431">code »</a><span class="member"><a name="goog.dom.compareParentsDescendantNodeIe_">goog.dom.compareParentsDescendantNodeIe_</a> <span class="args">( textNode, node )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Utility function to compare the position of two nodes, when
<code >textNode</code>'s parent is an ancestor of <code >node</code>. If this entry
condition is not met, this function will attempt to reference a null object.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>textNode: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The textNode to compare.<dt>node: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The node to compare.</dl><tr><th>Returns<tr><td><dl>-1 if node is before textNode, +1 otherwise.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1453">code »</a><span class="member"><a name="goog.dom.compareSiblingOrder_">goog.dom.compareSiblingOrder_</a> <span class="args">( node1, node2 )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Utility function to compare the position of two nodes known to be non-equal
siblings.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>node1: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The first node to compare.<dt>node2: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The second node to compare.</dl><tr><th>Returns<tr><td><dl>-1 if node1 is before node2, +1 otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1317">code »</a><span class="member"><a name="goog.dom.contains">goog.dom.contains</a> <span class="args">( parent, descendant )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Whether a node contains another node.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>parent: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The node that should contain the other node.<dt>descendant: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The node to test presence of.</dl><tr><th>Returns<tr><td><dl>Whether the parent node contains the descendent node.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l680">code »</a><span class="member"><a name="goog.dom.createDom">goog.dom.createDom</a> <span class="args">( tagName, opt_attributes, var_args )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Returns a dom node with a set of attributes. This function accepts varargs
for subsequent nodes to be added. Subsequent nodes will be added to the
first node as childNodes.
So:
<code>createDom('div', null, createDom('p'), createDom('p'));</code>
would return a div with two child paragraphs</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>tagName: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Tag to create.<dt>opt_attributes: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>.<<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)=</code><dd>If object, then a map
of name-value pairs for attributes. If a string, then this is the
className of the new element. If an array, the elements will be joined
together as the className of the new element.<dt>var_args: <code class="type">...(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177">NodeList</a>)</code><dd>Further DOM nodes or
strings for text nodes. If one of the var_args is an array or NodeList,i
its elements will be added as childNodes instead.</dl><tr><th>Returns<tr><td><dl>Reference to a DOM node.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l693">code »</a><span class="member"><a name="goog.dom.createDom_">goog.dom.createDom_</a> <span class="args">( doc, args )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Helper for <code >createDom</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>doc: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a></code><dd>The document to create the DOM in.<dt>args: <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Functions_and_function_scope/arguments">Arguments</a></code><dd>Argument object passed from the callers. See
<code >goog.dom.createDom</code> for details.</dl><tr><th>Returns<tr><td><dl>Reference to a DOM node.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l799">code »</a><span class="member"><a name="goog.dom.createElement">goog.dom.createElement</a> <span class="args">( name )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Creates a new element.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>name: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>Tag name.</dl><tr><th>Returns<tr><td><dl>The new element.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l821">code »</a><span class="member"><a name="goog.dom.createTable">goog.dom.createTable</a> <span class="args">( rows, columns, opt_fillWithNbsp )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Create a table.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>rows: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The number of rows in the table. Must be >= 1.<dt>columns: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The number of columns in the table. Must be >= 1.<dt>opt_fillWithNbsp: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>If true, fills table entries with nsbps.</dl><tr><th>Returns<tr><td><dl>The created table.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l835">code »</a><span class="member"><a name="goog.dom.createTable_">goog.dom.createTable_</a> <span class="args">( doc, rows, columns, fillWithNbsp )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Create a table.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>doc: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a></code><dd>Document object to use to create the table.<dt>rows: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The number of rows in the table. Must be >= 1.<dt>columns: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code><dd>The number of columns in the table. Must be >= 1.<dt>fillWithNbsp: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd>If true, fills table entries with nsbps.</dl><tr><th>Returns<tr><td><dl>The created table.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l809">code »</a><span class="member"><a name="goog.dom.createTextNode">goog.dom.createTextNode</a> <span class="args">( content )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1312295772">Text</a></code></span></div><p>Creates a new text node.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>content: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)</code><dd>Content.</dl><tr><th>Returns<tr><td><dl>The new text node.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1474">code »</a><span class="member"><a name="goog.dom.findCommonAncestor">goog.dom.findCommonAncestor</a> <span class="args">( var_args )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code></span></div><p>Find the deepest common ancestor of the given nodes.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>var_args: <code class="type">...<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The nodes to find a common ancestor of.</dl><tr><th>Returns<tr><td><dl>The common ancestor of the nodes, or null if there is none.
null will only be returned if two or more of the nodes are from different
documents.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1608">code »</a><span class="member"><a name="goog.dom.findNode">goog.dom.findNode</a> <span class="args">( root, p )</span> ⇒ <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code></span></div><p>Finds the first descendant node that matches the filter function, using
a depth first search. This function offers the most general purpose way
of finding a matching element. You may also wish to consider
<code >goog.dom.query</code> which can express many matching criteria using
CSS selector expressions. These expressions often result in a more
compact representation of the desired result.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>root: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The root of the tree to search.<dt>p: <code class="type">function(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd>The filter function.</dl><tr><th>Returns<tr><td><dl>The found node or undefined if none is found.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1627">code »</a><span class="member"><a name="goog.dom.findNodes">goog.dom.findNodes</a> <span class="args">( root, p )</span> ⇒ <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code></span></div><p>Finds all the descendant nodes that match the filter function, using a
a depth first search. This function offers the most general-purpose way
of finding a set of matching elements. You may also wish to consider
<code >goog.dom.query</code> which can express many matching criteria using
CSS selector expressions. These expressions often result in a more
compact representation of the desired result.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>root: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The root of the tree to search.<dt>p: <code class="type">function(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd>The filter function.</dl><tr><th>Returns<tr><td><dl>The found nodes or an empty array if none are found.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1645">code »</a><span class="member"><a name="goog.dom.findNodes_">goog.dom.findNodes_</a> <span class="args">( root, p, rv, findOne )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code></span></div><p>Finds the first or all the descendant nodes that match the filter function,
using a depth first search.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>root: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The root of the tree to search.<dt>p: <code class="type">function(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd>The filter function.<dt>rv: <code class="type">!<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a></code><dd>The found nodes are added to this array.<dt>findOne: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd>If true we exit after the first found node.</dl><tr><th>Returns<tr><td><dl>Whether the search is complete or not. True in case findOne
is true and the node is found. False otherwise.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1098">code »</a><span class="member"><a name="goog.dom.flattenElement">goog.dom.flattenElement</a> <span class="args">( element )</span> ⇒ <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Undefined">undefined</a>)</code></span></div><p>Flattens an element. That is, removes it and replace it with its children.
Does nothing if the element is not in the document.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element to flatten.</dl><tr><th>Returns<tr><td><dl>The original element, detached from the document
tree, sans children; or undefined, if the element was not in the document
to begin with.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l2082">code »</a><span class="member"><a name="goog.dom.getActiveElement">goog.dom.getActiveElement</a> <span class="args">( doc )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Determines the active element in the given document.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>doc: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a></code><dd>The document to look in.</dl><tr><th>Returns<tr><td><dl>The active element.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l2058">code »</a><span class="member"><a name="goog.dom.getAncestor">goog.dom.getAncestor</a> <span class="args">( element, matcher, opt_includeNode, opt_maxSearchSteps )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code></span></div><p>Walks up the DOM hierarchy returning the first ancestor that passes the
matcher function.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The DOM node to start with.<dt>matcher: <code class="type">function(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a>): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code><dd>A function that returns true if the
passed node matches the desired criteria.<dt>opt_includeNode: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a>=</code><dd>If true, the node itself is included in
the search (the first call to the matcher will pass startElement as
the node to test).<dt>opt_maxSearchSteps: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>=</code><dd>Maximum number of levels to search up the
dom.</dl><tr><th>Returns<tr><td><dl>DOM node that matched the matcher, or null if there was
no match.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l2039">code »</a><span class="member"><a name="goog.dom.getAncestorByClass">goog.dom.getAncestorByClass</a> <span class="args">( element, className )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Walks up the DOM hierarchy returning the first ancestor that has the passed
class name. If the passed element matches the specified criteria, the
element itself is returned.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The DOM node to start with.<dt>className: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The class name to match.</dl><tr><th>Returns<tr><td><dl>The first ancestor that matches the passed criteria, or
null if none match.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l2016">code »</a><span class="member"><a name="goog.dom.getAncestorByTagNameAndClass">goog.dom.getAncestorByTagNameAndClass</a> <span class="args">( element, opt_tag, opt_class )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Walks up the DOM hierarchy returning the first ancestor that has the passed
tag name and/or class name. If the passed element matches the specified
criteria, the element itself is returned.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a></code><dd>The DOM node to start with.<dt>opt_tag: <code class="type">?(<a href="enum_goog_dom_TagName.html">goog.dom.TagName</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>)=</code><dd>The tag name to match (or
null/undefined to match only based on class name).<dt>opt_class: <code class="type">?<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>=</code><dd>The class name to match (or null/undefined to
match only based on tag name).</dl><tr><th>Returns<tr><td><dl>The first ancestor that matches the passed criteria, or
null if no match is found.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l1123">code »</a><span class="member"><a name="goog.dom.getChildren">goog.dom.getChildren</a> <span class="args">( element )</span> ⇒ <code class="type">!(<a href="http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array">Array</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177">NodeList</a>)</code></span></div><p>Returns an array containing just the element children of the given element.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code><dd>The element whose element children we want.</dl><tr><th>Returns<tr><td><dl>An array or array-like list of just the element
children of the given element.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l96">code »</a><span class="member"><a name="goog.dom.getDocument">goog.dom.getDocument</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a></code></span></div><p>Gets the document object being used by the dom library.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>Document object.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l484">code »</a><span class="member"><a name="goog.dom.getDocumentHeight">goog.dom.getDocumentHeight</a> <span class="args">( )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Calculates the height of the document.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The height of the current document.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l499">code »</a><span class="member"><a name="goog.dom.getDocumentHeight_">goog.dom.getDocumentHeight_</a> <span class="args">( win )</span> ⇒ <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a></code></span></div><p>Calculates the height of the document of the given window.
Function code copied from the opensocial gadget api:
gadgets.window.adjustHeight(opt_height)</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>win: <code class="type">Window</code><dd>The window whose document height to retrieve.</dl><tr><th>Returns<tr><td><dl>The height of the document of the given window.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l584">code »</a><span class="member"><a name="goog.dom.getDocumentScroll">goog.dom.getDocumentScroll</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Gets the document scroll distance as a coordinate object.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>Object with values 'x' and 'y'.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l615">code »</a><span class="member"><a name="goog.dom.getDocumentScrollElement">goog.dom.getDocumentScrollElement</a> <span class="args">( )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Gets the document scroll element.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>Scrolling element.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l626">code »</a><span class="member"><a name="goog.dom.getDocumentScrollElement_">goog.dom.getDocumentScrollElement_</a> <span class="args">( doc )</span> ⇒ <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Helper for <code >getDocumentScrollElement</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>doc: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a></code><dd>The document to get the scroll element for.</dl><tr><th>Returns<tr><td><dl>Scrolling element.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l596">code »</a><span class="member"><a name="goog.dom.getDocumentScroll_">goog.dom.getDocumentScroll_</a> <span class="args">( doc )</span> ⇒ <code class="type">!<a href="class_goog_math_Coordinate.html">goog.math.Coordinate</a></code></span></div><p>Helper for <code >getDocumentScroll</code>.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>doc: <code class="type">!<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a></code><dd>The document to get the scroll for.</dl><tr><th>Returns<tr><td><dl>Object with values 'x' and 'y'.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l76">code »</a><span class="member"><a name="goog.dom.getDomHelper">goog.dom.getDomHelper</a> <span class="args">( opt_element )</span> ⇒ <code class="type">!<a href="class_goog_dom_DomHelper.html">goog.dom.DomHelper</a></code></span></div><p>Gets the DomHelper object for the document where the element resides.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>opt_element: <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247">Node</a>|Window)=</code><dd>If present, gets the DomHelper for this
element.</dl><tr><th>Returns<tr><td><dl>The DomHelper.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l109">code »</a><span class="member"><a name="goog.dom.getElement">goog.dom.getElement</a> <span class="args">( element )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Gets an element from the current document by element id.
If an Element is passed in, it is returned.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>element: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>)</code><dd>Element ID or a DOM node.</dl><tr><th>Returns<tr><td><dl>The element with the given ID, or the node passed in.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l226">code »</a><span class="member"><a name="goog.dom.getElementByClass">goog.dom.getElementByClass</a> <span class="args">( className, opt_el )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Returns the first element with the provided className.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>className: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>the name of the class to look for.<dt>opt_el: <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a>)=</code><dd>Optional element to look in.</dl><tr><th>Returns<tr><td><dl>The first item with the class name provided.</dl></table></div></details></div></div><div class="wrap-details private"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l122">code »</a><span class="member"><a name="goog.dom.getElementHelper_">goog.dom.getElementHelper_</a> <span class="args">( doc, element )</span> ⇒ <code class="type"><a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a></code></span></div><p>Gets an element by id from the given document (if present).
If an element is given, it is returned.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>doc<dt>element: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>)</code><dd>Element ID or a DOM node.</dl><tr><th>Returns<tr><td><dl>The resulting element.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l209">code »</a><span class="member"><a name="goog.dom.getElementsByClass">goog.dom.getElementsByClass</a> <span class="args">( className, opt_el )</span> ⇒ <code class="type">{length: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}</code></span></div><p>Returns a static, array-like list of the elements with the provided
className.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>className: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>the name of the class to look for.<dt>opt_el: <code class="type">(<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document">Document</a>|<a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614">Element</a>)=</code><dd>Optional element to look in.</dl><tr><th>Returns<tr><td><dl>The items found with the class name provided.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source/lib/goog/dom/dom.js.src.html#l195">code »</a><span class="member"><a name="goog.dom.getElementsByTagNameAndClass">goog.dom.getElementsByTagNameAndClass</a> <span class="args">( opt_tag, opt_class, opt_el )</span> ⇒ <code class="type">{length: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>}</code></span></div><p>Looks up elements by both tag and class name, using browser native functions
(<code >querySelectorAll</code>, <code >getElementsByTagName</code> or
<code >getElementsByClassName</code>) where possible. This function
is a useful, if limited, way of collecting a list of DOM elements
with certain characteristics. <code >goog.dom.query</code> offers a
more powerful and general solution which allows matching on CSS3
selector expressions, but at increased cost in code size. If all you
need is particular tags belonging to a single class, this function
is fast and sleek.
Note that tag names are case sensitive in the SVG namespace, and this
function converts opt_tag to uppercase for comparisons. For queries in the
SVG namespace you should use querySelector or querySelectorAll instead.
https://bugzilla.mozilla.org/show_bug.cgi?id=963870
https://bugs.webkit.org/show_bug.cgi?id=83438</s