Skip to content

Commit

Permalink
Fix return type and elaborate for callbacks methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kswedberg committed Sep 3, 2012
1 parent 0dc8518 commit 0828702
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 16 deletions.
5 changes: 3 additions & 2 deletions entries/callbacks.add.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entry name="callbacks.add" type="method" return="undefined"> <entry name="callbacks.add" type="method" return="Callbacks">
<title>callbacks.add()</title> <title>callbacks.add()</title>
<signature> <signature>
<added>1.7</added> <added>1.7</added>
Expand All @@ -9,6 +9,7 @@
</signature> </signature>
<desc>Add a callback or a collection of callbacks to a callback list.</desc> <desc>Add a callback or a collection of callbacks to a callback list.</desc>
<longdesc> <longdesc>
<p>This method returns the Callbacks object onto which it is attached (<code>this</code>). </p>
<h2 id="example-1">Example</h2> <h2 id="example-1">Example</h2>
<p>Using <code>callbacks.add()</code> to add new callbacks to a callback list:</p> <p>Using <code>callbacks.add()</code> to add new callbacks to a callback list:</p>
<pre><code> <pre><code>
Expand Down Expand Up @@ -45,4 +46,4 @@ callbacks.fire( 'world' );
</longdesc> </longdesc>
<category slug="callbacks-object"/> <category slug="callbacks-object"/>
<category slug="version/1.7"/> <category slug="version/1.7"/>
</entry> </entry>
5 changes: 3 additions & 2 deletions entries/callbacks.disable.xml
@@ -1,11 +1,12 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entry name="callbacks.disable" type="method" return="undefined"> <entry name="callbacks.disable" type="method" return="Callbacks">
<title>callbacks.disable()</title> <title>callbacks.disable()</title>
<signature> <signature>
<added>1.7</added> <added>1.7</added>
</signature> </signature>
<desc>Disable a callback list from doing anything more.</desc> <desc>Disable a callback list from doing anything more.</desc>
<longdesc> <longdesc>
<p>This method returns the Callbacks object onto which it is attached (<code>this</code>). </p>
<h2 id="example-1">Example</h2> <h2 id="example-1">Example</h2>
<p>Using <code>callbacks.disable()</code> to disable further calls being made to a callback list:</p> <p>Using <code>callbacks.disable()</code> to disable further calls being made to a callback list:</p>
<pre><code> <pre><code>
Expand All @@ -31,4 +32,4 @@ callbacks.fire( 'foobar' ); // foobar isn't output
</longdesc> </longdesc>
<category slug="callbacks-object"/> <category slug="callbacks-object"/>
<category slug="version/1.7"/> <category slug="version/1.7"/>
</entry> </entry>
5 changes: 3 additions & 2 deletions entries/callbacks.empty.xml
@@ -1,11 +1,12 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entry name="callbacks.empty" type="method" return="undefined"> <entry name="callbacks.empty" type="method" return="Callbacks">
<title>callbacks.empty()</title> <title>callbacks.empty()</title>
<signature> <signature>
<added>1.7</added> <added>1.7</added>
</signature> </signature>
<desc>Remove all of the callbacks from a list.</desc> <desc>Remove all of the callbacks from a list.</desc>
<longdesc> <longdesc>
<p>This method returns the Callbacks object onto which it is attached (<code>this</code>). </p>
<h2 id="example-1">Example</h2> <h2 id="example-1">Example</h2>
<p>Using <code>callbacks.empty()</code> to empty a list of callbacks:</p> <p>Using <code>callbacks.empty()</code> to empty a list of callbacks:</p>
<pre><code> <pre><code>
Expand Down Expand Up @@ -35,4 +36,4 @@ console.log( callbacks.has( bar ) ); // false
</longdesc> </longdesc>
<category slug="callbacks-object"/> <category slug="callbacks-object"/>
<category slug="version/1.7"/> <category slug="version/1.7"/>
</entry> </entry>
5 changes: 3 additions & 2 deletions entries/callbacks.fire.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entry name="callbacks.fire" type="method" return="undefined"> <entry name="callbacks.fire" type="method" return="Callbacks">
<title>callbacks.fire()</title> <title>callbacks.fire()</title>
<signature> <signature>
<added>1.7</added> <added>1.7</added>
Expand All @@ -9,6 +9,7 @@
</signature> </signature>
<desc>Call all of the callbacks with the given arguments</desc> <desc>Call all of the callbacks with the given arguments</desc>
<longdesc> <longdesc>
<p>This method returns the Callbacks object onto which it is attached (<code>this</code>). </p>
<h2 id="example-1">Example</h2> <h2 id="example-1">Example</h2>
<p>Using <code>callbacks.fire()</code> to invoke the callbacks in a list with any arguments that have been passed:</p> <p>Using <code>callbacks.fire()</code> to invoke the callbacks in a list with any arguments that have been passed:</p>
<pre><code> <pre><code>
Expand Down Expand Up @@ -43,4 +44,4 @@ callbacks.fire( 'hello again' );
</longdesc> </longdesc>
<category slug="callbacks-object"/> <category slug="callbacks-object"/>
<category slug="version/1.7"/> <category slug="version/1.7"/>
</entry> </entry>
5 changes: 3 additions & 2 deletions entries/callbacks.fireWith.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entry name="callbacks.fireWith" type="method" return="undefined"> <entry name="callbacks.fireWith" type="method" return="Callbacks">
<title>callbacks.fireWith()</title> <title>callbacks.fireWith()</title>
<signature> <signature>
<added>1.7</added> <added>1.7</added>
Expand All @@ -12,6 +12,7 @@
</signature> </signature>
<desc>Call all callbacks in a list with the given context and arguments.</desc> <desc>Call all callbacks in a list with the given context and arguments.</desc>
<longdesc> <longdesc>
<p>This method returns the Callbacks object onto which it is attached (<code>this</code>). </p>
<h2 id="example-1">Example</h2> <h2 id="example-1">Example</h2>
<p>Using <code>callbacks.fireWith()</code> to fire a list of callbacks with a specific context and an array of arguments:</p> <p>Using <code>callbacks.fireWith()</code> to fire a list of callbacks with a specific context and an array of arguments:</p>
<pre><code> <pre><code>
Expand All @@ -35,4 +36,4 @@ callbacks.fireWith( window, ['foo','bar']);
</longdesc> </longdesc>
<category slug="callbacks-object"/> <category slug="callbacks-object"/>
<category slug="version/1.7"/> <category slug="version/1.7"/>
</entry> </entry>
8 changes: 5 additions & 3 deletions entries/callbacks.lock.xml
@@ -1,11 +1,13 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entry name="callbacks.lock" type="method" return="undefined"> <entry name="callbacks.lock" type="method" return="Callbacks">
<title>callbacks.lock()</title> <title>callbacks.lock()</title>
<signature> <signature>
<added>1.7</added> <added>1.7</added>
</signature> </signature>
<desc>Lock a callback list in its current state.</desc> <desc>Lock a callback list in its current state.</desc>
<longdesc/> <longdesc>
<p>This method returns the Callbacks object onto which it is attached (<code>this</code>). </p>
</longdesc>
<example> <example>
<desc>Using <code>callbacks.lock()</code> to lock a callback list to avoid further changes being made to the list state:</desc> <desc>Using <code>callbacks.lock()</code> to lock a callback list to avoid further changes being made to the list state:</desc>
<code><![CDATA[// a sample logging function to be added to a callbacks list <code><![CDATA[// a sample logging function to be added to a callbacks list
Expand Down Expand Up @@ -34,4 +36,4 @@ callbacks.fire( 'world' );
</example> </example>
<category slug="callbacks-object"/> <category slug="callbacks-object"/>
<category slug="version/1.7"/> <category slug="version/1.7"/>
</entry> </entry>
8 changes: 5 additions & 3 deletions entries/callbacks.remove.xml
@@ -1,5 +1,5 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<entry name="callbacks.remove" type="method" return="undefined"> <entry name="callbacks.remove" type="method" return="Callbacks">
<title>callbacks.remove()</title> <title>callbacks.remove()</title>
<signature> <signature>
<added>1.7</added> <added>1.7</added>
Expand All @@ -8,7 +8,9 @@
</argument> </argument>
</signature> </signature>
<desc>Remove a callback or a collection of callbacks from a callback list.</desc> <desc>Remove a callback or a collection of callbacks from a callback list.</desc>
<longdesc/> <longdesc>
<p>This method returns the Callbacks object onto which it is attached (<code>this</code>). </p>
</longdesc>
<example> <example>
<desc>Using <code>callbacks.remove()</code> to remove callbacks from a callback list:</desc> <desc>Using <code>callbacks.remove()</code> to remove callbacks from a callback list:</desc>
<code><![CDATA[// a sample logging function to be added to a callbacks list <code><![CDATA[// a sample logging function to be added to a callbacks list
Expand All @@ -35,4 +37,4 @@ callbacks.fire( 'world' );
</example> </example>
<category slug="callbacks-object"/> <category slug="callbacks-object"/>
<category slug="version/1.7"/> <category slug="version/1.7"/>
</entry> </entry>

0 comments on commit 0828702

Please sign in to comment.