212 lines
No EOL
10 KiB
HTML
212 lines
No EOL
10 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>YAHOO.util.Subscriber</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.Subscriber.html" target="_blank">Print Friendly</a></div>
|
|
<h1>Class YAHOO.util.Subscriber</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>YAHOO.util</td></tr>
|
|
<tr><td class="label">Class:</td><td>Subscriber</td></tr>
|
|
<tr><td class="label">Extends:</td><td>Object</td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="event.js.html">event.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
Stores the subscriber information to be used when the event fires. </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="#fn">fn</a> : function</td>
|
|
<td class="msource" rowspan="2">Subscriber</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The callback that will be execute when the event fires</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#obj">obj</a> : object</td>
|
|
<td class="msource" rowspan="2">Subscriber</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">An optional custom object that will passed to the callback when
|
|
the event fires</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#override">override</a> : boolean|object</td>
|
|
<td class="msource" rowspan="2">Subscriber</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The default execution scope for the event listener is defined when the
|
|
event is created (usually the object which con...</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="#Subscriber">Subscriber</a>()</td>
|
|
<td class="msource" rowspan="2">Subscriber</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc"></td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#contains">contains</a>(<code>Function fn</code>, <code>Object obj</code>) : boolean</td>
|
|
<td class="msource" rowspan="2">Subscriber</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Returns true if the fn and obj match this objects properties.
|
|
Used by the unsubscribe method to match the right subsc...</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#getScope">getScope</a>(<code>Object defaultScope</code>) : void</td>
|
|
<td class="msource" rowspan="2">Subscriber</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Returns the execution scope for this listener. If override was set to true
|
|
the custom obj will be the scope. If ove...</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#toString">toString</a>() : void</td>
|
|
<td class="msource" rowspan="2">Subscriber</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc"></td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<div class="no-members">This class has no public events.</div>
|
|
<h2 class="mdetail-head">Property Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="fn"></a>
|
|
<div class="mdetail">
|
|
<h3>fn</i></h3>
|
|
<code>public function fn</code>
|
|
<div class="mdetail-desc">
|
|
The callback that will be execute when the event fires </div>
|
|
<div class="mdetail-def">This property is defined by Subscriber.</div>
|
|
</div>
|
|
<a name="obj"></a>
|
|
<div class="mdetail alt">
|
|
<h3>obj</i></h3>
|
|
<code>public object obj</code>
|
|
<div class="mdetail-desc">
|
|
An optional custom object that will passed to the callback when
|
|
the event fires </div>
|
|
<div class="mdetail-def">This property is defined by Subscriber.</div>
|
|
</div>
|
|
<a name="override"></a>
|
|
<div class="mdetail">
|
|
<h3>override</i></h3>
|
|
<code>public boolean|object override</code>
|
|
<div class="mdetail-desc">
|
|
The default execution scope for the event listener is defined when the
|
|
event is created (usually the object which contains the event).
|
|
By setting override to true, the execution scope becomes the custom
|
|
object passed in by the subscriber. If override is an object, that
|
|
object becomes the scope. </div>
|
|
<div class="mdetail-def">This property is defined by Subscriber.</div>
|
|
</div>
|
|
</div>
|
|
|
|
<a name="Subscriber"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>Subscriber</i></h3>
|
|
<code>public function Subscriber()</code>
|
|
<div class="mdetail-desc">
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="contains"></a>
|
|
<div class="mdetail">
|
|
<h3>contains</i></h3>
|
|
<code>public function contains(<code>Function fn</code>, <code>Object obj</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Returns true if the fn and obj match this objects properties.
|
|
Used by the unsubscribe method to match the right subscriber.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>fn</code> : Function<div class="sub-desc">the function to execute</div></li><li><code>obj</code> : Object<div class="sub-desc">an object to be passed along when the event fires</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>boolean</code><div class="sub-desc">true if the supplied arguments match this subscriber's signature.</div></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Subscriber.</div>
|
|
</div>
|
|
<a name="getScope"></a>
|
|
<div class="mdetail alt">
|
|
<h3>getScope</i></h3>
|
|
<code>public function getScope(<code>Object defaultScope</code>)</code>
|
|
<div class="mdetail-desc">
|
|
Returns the execution scope for this listener. If override was set to true
|
|
the custom obj will be the scope. If override is an object, that is the
|
|
scope, otherwise the default scope will be used.
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>defaultScope</code> : Object<div class="sub-desc">the scope to use if this listener does not override it.</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by Subscriber.</div>
|
|
</div>
|
|
<a name="toString"></a>
|
|
<div class="mdetail">
|
|
<h3>toString</i></h3>
|
|
<code>public function toString()</code>
|
|
<div class="mdetail-desc">
|
|
|
|
<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 Subscriber.</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<hr>
|
|
Copyright © 2006 Jack Slocum. All rights reserved.
|
|
</body>
|
|
</html>
|
|
|