647 lines
No EOL
33 KiB
HTML
647 lines
No EOL
33 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>YAHOO.util.Element</title>
|
|
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools"><img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="YAHOO.util.Element.html" target="_blank">Print Friendly</a></div>
|
|
<h1>Class YAHOO.util.Element</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>YAHOO.util</td></tr>
|
|
<tr><td class="label">Class:</td><td>Element</td></tr>
|
|
<tr><td class="label">Extends:</td><td>Object</td></tr>
|
|
<tr><td class="label">Subclasses:</td><td><a href="YAHOO.widget.Tab.html">Tab</a>, <a href="YAHOO.widget.TabView.html">TabView</a></td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="tabview.js.html">tabview.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
Element provides an interface to an HTMLElement's attributes and common
|
|
methods. Other commonly used attributes are added as well.
|
|
@uses YAHOO.util.AttributeProvider </div>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Property</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#DOM_EVENTS">DOM_EVENTS</a> : Object</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Dom events supported by the Element instance.</td>
|
|
</tr>
|
|
</table>
|
|
<a name="methods"></a>
|
|
<h2>Public Methods</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Method</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#Element">Element</a>(<code>el {HTMLElement/String}</code>, <code>Object map</code>)</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addClass">addClass</a>(<code>String className</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Wrapper for Dom method.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#addListener">addListener</a>(<code>String type</code>, <code>Function fn</code>, <code>Any obj</code>, <code>Object scope</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Adds a listener for the given event. These may be DOM or
|
|
customEvent listeners. Any event that is fired via fireEve...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#appendChild">appendChild</a>(<code>Boolean deep</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Wrapper for HTMLElement method.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#appendTo">appendTo</a>(<code>HTMLElement/Element parentNode</code>, <code>HTMLElement/Element before</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Appends the HTMLElement into either the supplied parentNode.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#fireQueue">fireQueue</a>() : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Apply any queued set calls.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getElementsByClassName">getElementsByClassName</a>(<code>String className</code>, <span class="optional" title="Optional">[<code>String tag</code>]</span>) : Array</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Wrapper for Dom method.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getElementsByTagName">getElementsByTagName</a>(<code>String tag</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Wrapper for HTMLElement method.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getStyle">getStyle</a>(<code>String property</code>) : String</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Wrapper for Dom method.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#hasChildNodes">hasChildNodes</a>() : Boolean</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Wrapper for HTMLElement method.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#hasClass">hasClass</a>(<code>String className</code>) : Boolean</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Wrapper for Dom method.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#initAttributes">initAttributes</a>(<code>Object map</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Registers Element specific attributes.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#insertBefore">insertBefore</a>(<code>HTMLElement element</code>, <code>HTMLElement before</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Wrapper for HTMLElement method.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#on">on</a>(<code>String type</code>, <code>Function fn</code>, <code>Any obj</code>, <code>Object scope</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Alias for addListener</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeChild">removeChild</a>(<code>HTMLElement child</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Wrapper for HTMLElement method.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeClass">removeClass</a>(<code>String className</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Wrapper for Dom method.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#removeListener">removeListener</a>(<code>String type</code>, <code>Function fn</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Remove an event listener</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#replaceChild">replaceChild</a>(<code>HTMLElement newNode</code>, <code>HTMLElement oldNode</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Wrapper for HTMLElement method.</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#replaceClass">replaceClass</a>(<code>String oldClassName</code>, <code>String newClassName</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Wrapper for Dom method.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#setStyle">setStyle</a>(<code>String property</code>, <code>String value</code>) : void</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Wrapper for Dom method.</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Event</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-available
|
|
">available
|
|
</a> : ()</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Fires when the Element's HTMLElement can be retrieved by Id.
|
|
See: Element.addListener
|
|
Event fields:
|
|
<String> ty...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#event-contentReady
|
|
">contentReady
|
|
</a> : ()</td>
|
|
<td class="msource" rowspan="2">Element</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Fires when the Element's HTMLElement subtree is rendered.
|
|
See: Element.addListener
|
|
Event fields:
|
|
<String> type ...</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2 class="mdetail-head">Property Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="DOM_EVENTS"></a>
|
|
<div class="mdetail">
|
|
<h3>DOM_EVENTS</i></h3>
|
|
<code>public Object DOM_EVENTS</code>
|
|
<div class="mdetail-desc">
|
|
Dom events supported by the Element instance. </div>
|
|
<div class="mdetail-def">This property is defined by Element.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a name="Element"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>Element</i></h3>
|
|
<code>public function Element(<code>el {HTMLElement/String}</code>, <code>Object map</code>)</code>
|
|
<div class="mdetail-desc">
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>{HTMLElement/String}</code> : el<div class="sub-desc">The html element that represents the Element.</div></li><li><code>map</code> : Object<div class="sub-desc">A key-value map of initial config names and values</div></li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="addClass"></a>
|
|
<div class="mdetail">
|
|
<h3>addClass</i></h3>
|
|
<code>public function addClass(<code>String className</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for Dom method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>className</code> : String<div class="sub-desc">The className to add</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="addListener"></a>
|
|
<div class="mdetail alt">
|
|
<h3>addListener</i></h3>
|
|
<code>public function addListener(<code>String type</code>, <code>Function fn</code>, <code>Any obj</code>, <code>Object scope</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Adds a listener for the given event. These may be DOM or
|
|
customEvent listeners. Any event that is fired via fireEvent
|
|
can be listened for. All handlers receive an event object.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>type</code> : String<div class="sub-desc">The name of the event to listen for</div></li><li><code>fn</code> : Function<div class="sub-desc">The handler to call when the event fires</div></li><li><code>obj</code> : Any<div class="sub-desc">A variable to pass to the handler</div></li><li><code>scope</code> : Object<div class="sub-desc">The object to use for the scope of the handler</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="appendChild"></a>
|
|
<div class="mdetail">
|
|
<h3>appendChild</i></h3>
|
|
<code>public function appendChild(<code>Boolean deep</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for HTMLElement method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>deep</code> : Boolean<div class="sub-desc">Whether or not to do a deep clone</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="appendTo"></a>
|
|
<div class="mdetail alt">
|
|
<h3>appendTo</i></h3>
|
|
<code>public function appendTo(<code>HTMLElement/Element parentNode</code>, <code>HTMLElement/Element before</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Appends the HTMLElement into either the supplied parentNode.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>parentNode</code> : HTMLElement/Element<div class="sub-desc">The node to append to</div></li><li><code>before</code> : HTMLElement/Element<div class="sub-desc">An optional node to insert before</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="fireQueue"></a>
|
|
<div class="mdetail">
|
|
<h3>fireQueue</i></h3>
|
|
<code>public function fireQueue()</code>
|
|
<div class="mdetail-desc">
|
|
Apply any queued set calls.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="getElementsByClassName"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getElementsByClassName</i></h3>
|
|
<code>public function getElementsByClassName(<code>String className</code>, <span class="optional" title="Optional">[<code>String tag</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for Dom method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>className</code> : String<div class="sub-desc">The className to collect</div></li><li><code>tag</code> : String<div class="sub-desc">(optional) The tag to use in conjunction with class name</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Array</code><div class="sub-desc">Array of HTMLElements</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="getElementsByTagName"></a>
|
|
<div class="mdetail">
|
|
<h3>getElementsByTagName</i></h3>
|
|
<code>public function getElementsByTagName(<code>String tag</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for HTMLElement method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>tag</code> : String<div class="sub-desc">The tagName to collect</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="getStyle"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getStyle</i></h3>
|
|
<code>public function getStyle(<code>String property</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for Dom method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>property</code> : String<div class="sub-desc">The style property to retrieve</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>String</code><div class="sub-desc">The current value of the property</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="hasChildNodes"></a>
|
|
<div class="mdetail">
|
|
<h3>hasChildNodes</i></h3>
|
|
<code>public function hasChildNodes()</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for HTMLElement method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">Whether or not the element has childNodes</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="hasClass"></a>
|
|
<div class="mdetail alt">
|
|
<h3>hasClass</i></h3>
|
|
<code>public function hasClass(<code>String className</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for Dom method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>className</code> : String<div class="sub-desc">The className to add</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>Boolean</code><div class="sub-desc">Whether or not the element has the class name</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="initAttributes"></a>
|
|
<div class="mdetail">
|
|
<h3>initAttributes</i></h3>
|
|
<code>public function initAttributes(<code>Object map</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Registers Element specific attributes.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>map</code> : Object<div class="sub-desc">A key-value map of initial attribute configs</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="insertBefore"></a>
|
|
<div class="mdetail alt">
|
|
<h3>insertBefore</i></h3>
|
|
<code>public function insertBefore(<code>HTMLElement element</code>, <code>HTMLElement before</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for HTMLElement method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>element</code> : HTMLElement<div class="sub-desc">The HTMLElement to insert</div></li><li><code>before</code> : HTMLElement<div class="sub-desc">The HTMLElement to insert the element before.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="on"></a>
|
|
<div class="mdetail">
|
|
<h3>on</i></h3>
|
|
<code>public function on(<code>String type</code>, <code>Function fn</code>, <code>Any obj</code>, <code>Object scope</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Alias for addListener
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>type</code> : String<div class="sub-desc">The name of the event to listen for</div></li><li><code>fn</code> : Function<div class="sub-desc">The function call when the event fires</div></li><li><code>obj</code> : Any<div class="sub-desc">A variable to pass to the handler</div></li><li><code>scope</code> : Object<div class="sub-desc">The object to use for the scope of the handler</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="removeChild"></a>
|
|
<div class="mdetail alt">
|
|
<h3>removeChild</i></h3>
|
|
<code>public function removeChild(<code>HTMLElement child</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for HTMLElement method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>child</code> : HTMLElement<div class="sub-desc">The HTMLElement to remove</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="removeClass"></a>
|
|
<div class="mdetail">
|
|
<h3>removeClass</i></h3>
|
|
<code>public function removeClass(<code>String className</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for Dom method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>className</code> : String<div class="sub-desc">The className to remove</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="removeListener"></a>
|
|
<div class="mdetail alt">
|
|
<h3>removeListener</i></h3>
|
|
<code>public function removeListener(<code>String type</code>, <code>Function fn</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Remove an event listener
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>type</code> : String<div class="sub-desc">The name of the event to listen for</div></li><li><code>fn</code> : Function<div class="sub-desc">The function call when the event fires</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="replaceChild"></a>
|
|
<div class="mdetail">
|
|
<h3>replaceChild</i></h3>
|
|
<code>public function replaceChild(<code>HTMLElement newNode</code>, <code>HTMLElement oldNode</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for HTMLElement method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>newNode</code> : HTMLElement<div class="sub-desc">The HTMLElement to insert</div></li><li><code>oldNode</code> : HTMLElement<div class="sub-desc">The HTMLElement to replace</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="replaceClass"></a>
|
|
<div class="mdetail alt">
|
|
<h3>replaceClass</i></h3>
|
|
<code>public function replaceClass(<code>String oldClassName</code>, <code>String newClassName</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for Dom method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>oldClassName</code> : String<div class="sub-desc">The className to replace</div></li><li><code>newClassName</code> : String<div class="sub-desc">The className to add</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
<a name="setStyle"></a>
|
|
<div class="mdetail">
|
|
<h3>setStyle</i></h3>
|
|
<code>public function setStyle(<code>String property</code>, <code>String value</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Wrapper for Dom method.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>property</code> : String<div class="sub-desc">The style property to set</div></li><li><code>value</code> : String<div class="sub-desc">The value to apply to the style property</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Element.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Event Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="event-available
|
|
"></a>
|
|
<div class="mdetail">
|
|
<h3>available
|
|
</i></h3>
|
|
<code>public event available
|
|
</code>
|
|
<div class="mdetail-desc">
|
|
Fires when the Element's HTMLElement can be retrieved by Id.
|
|
<p>See: <a href="#addListener">Element.addListener</a></p>
|
|
<p><strong>Event fields:</strong><br>
|
|
<code><String> type</code> available<br>
|
|
<code><HTMLElement>
|
|
target</code> the HTMLElement bound to this Element instance<br>
|
|
<p><strong>Usage:</strong><br>
|
|
<code>var handler = function(e) {var target = e.target};<br>
|
|
myTabs.addListener('available', handler);</code></p>
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by Element.</div>
|
|
</div>
|
|
<a name="event-contentReady
|
|
"></a>
|
|
<div class="mdetail alt">
|
|
<h3>contentReady
|
|
</i></h3>
|
|
<code>public event contentReady
|
|
</code>
|
|
<div class="mdetail-desc">
|
|
Fires when the Element's HTMLElement subtree is rendered.
|
|
<p>See: <a href="#addListener">Element.addListener</a></p>
|
|
<p><strong>Event fields:</strong><br>
|
|
<code><String> type</code> contentReady<br>
|
|
<code><HTMLElement>
|
|
target</code> the HTMLElement bound to this Element instance<br>
|
|
<p><strong>Usage:</strong><br>
|
|
<code>var handler = function(e) {var target = e.target};<br>
|
|
myTabs.addListener('contentReady', handler);</code></p>
|
|
<div class="mdetail-params">
|
|
<strong style="font-weight:normal;">Subscribers will be called with the following parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This event is defined by Element.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr>
|
|
Copyright © 2006 Jack Slocum. All rights reserved.
|
|
</body>
|
|
</html>
|
|
|