Event.Subscriber.html revision 4fcbec6145d16637205990699912fb90f6a3807c
<html>
<head>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h3>event <span class="subtitle">3.00PR1</span></h3>
<p>
> Event.Subscriber
</p>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form name="yui-classopts-form">
<span id="classopts"><input type="checkbox" name="showprivate" id="showprivate" /> <label for="showprivate">Show Private</label></span>
<span id="classopts"><input type="checkbox" name="showprotected" id="showprotected" /> <label for="showprotected">Show Protected</label></span>
<span id="classopts"><input type="checkbox" name="showdeprecated" id="showdeprecated" /> <label for="showdeprecated">Show Deprecated</label></span>
</form>
<h2>
<span class="extends">
</span>
<span class="extends">
</span>
</code>
</h2>
<!-- class tree goes here -->
<div class="summary description">
Stores the subscriber information to be used when the event fires.
</div>
<div class="section constructor details">
<h3 id="constructor">Constructor</h3>
<div class="content">
<div class="detail">
<code>
(
fn
,
obj
,
args
)
</code>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>fn
<Function>
</code>
The wrapped function to execute
</dd>
<dd>
<code>obj
<Object>
</code>
An object to be passed along when the event fires
</dd>
<dd>
<code>args
<Array>
</code>
subscribe() additional arguments
</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="section field details">
<h3 id="properties">Properties</h3>
<div class="content">
<div class="">
<h4><a name="property_args">args</a>
<code>- Array</code>
</h4>
<div class="detail">
<div class="description">
Optional additional arguments supplied to subscribe(). If present,
these will be appended to the arguments supplied to fire()
</div>
</div>
<hr />
</div>
<div class="">
<h4><a name="property_fn">fn</a>
<code>- Function</code>
</h4>
<div class="detail">
<div class="description">
The callback that will be execute when the event fires
This is wrapped by Y.bind if obj was supplied.
</div>
</div>
<hr />
</div>
<div class="">
<h4><a name="property_id">id</a>
<code>- String</code>
</h4>
<div class="detail">
<div class="description">
Unique subscriber id
</div>
</div>
<hr />
</div>
<div class="">
<h4><a name="property_obj">obj</a>
<code>- Object</code>
</h4>
<div class="detail">
<div class="description">
An optional custom object that will passed to the callback when
the event fires
</div>
</div>
<hr />
</div>
<div class="">
<h4><a name="property_wrappedFn">wrappedFn</a>
<code>- Function</code>
</h4>
<div class="detail">
<div class="description">
}
fn bound to obj with additional arguments applied via Y.bind
</div>
</div>
<hr />
</div>
</div>
</div>
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="">
<h4>
<a name="method_contains">contains</a></h4>
<div class="detail">
<code>
boolean
<strong>contains</strong>
(
fn
,
obj
)
</code>
<div class="description">
Returns true if the fn and obj match this objects properties.
Used by the unsubscribe method to match the right subscriber.
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>fn <Function></code>
the function to execute
</dd>
<dd>
<code>obj <Object></code>
an object to be passed along when the event fires
</dd>
</dl>
<dl>
<dt>Returns:
<code>
boolean
</code></dt>
<dd>true if the supplied arguments match this
subscriber's signature.</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_notify">notify</a></h4>
<div class="detail">
<code>
void
<strong>notify</strong>
(
defaultContext
,
args
)
</code>
<div class="description">
Executes the subscriber.
</div>
<div class="description">
<dl>
<dt>Parameters:</dt>
<dd>
<code>defaultContext <object></code>
The execution context if not overridden
by the subscriber
</dd>
<dd>
<code>args <Array></code>
Arguments array for the subscriber
</dd>
</dl>
<dl>
<dt>Returns:
<code>
void
</code></dt>
<dd></dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="">
<h4>
<a name="method_toString">toString</a></h4>
<div class="detail">
<code>
void
<strong>toString</strong>
(
)
</code>
<div class="description">
</div>
<div class="description">
<dl>
<dt>Returns:
<code>
void
</code></dt>
<dd></dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div class="module">
<h4>Modules</h4>
<ul class="content">
</ul>
</div>
<div class="module">
<h4>Classes</h4>
<ul class="content">
</ul>
</div>
<div class="module">
<h4>Files</h4>
<ul class="content">
</ul>
</div>
<div class="module">
<h4>Properties</h4>
<ul class="content">
<li class=""><a href="#property_args">args</a>
<!--<code><Function></code>-->
</li>
<li class=""><a href="#property_fn">fn</a>
<!--<code><Function></code>-->
</li>
<li class=""><a href="#property_id">id</a>
<!--<code><Function></code>-->
</li>
<li class=""><a href="#property_obj">obj</a>
<!--<code><Function></code>-->
</li>
<li class=""><a href="#property_wrappedFn">wrappedFn</a>
<!--<code><Function></code>-->
</li>
</ul>
</div>
<div class="module">
<h4>Methods</h4>
<ul class="content">
<li class=""><!--<code>boolean</code>-->
<a href="#method_contains">contains</a>
</li>
<li class=""><!--<code>void</code>-->
<a href="#method_notify">notify</a>
</li>
<li class=""><!--<code>void</code>-->
<a href="#method_toString">toString</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2008 Yahoo! Inc. All rights reserved.
</div>
</div>
</body>
</html>