UNPKG

@irrelon/emitter

Version:

Simple JavaScript event emitter with some powerful features.

857 lines (228 loc) 9.23 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: off</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: off</h1> <section> <header> <h2>off</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="off"><span class="type-signature"></span>new off<span class="signature">(event, id)</span><span class="type-signature"></span></h4> <div class="description"> Cancels all listeners for an event based on the passed event name and id. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>event</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The event name to cancel listeners for.</td> </tr> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="description last">The ID to cancel all listeners for.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Emitter.js.html">Emitter.js</a>, <a href="Emitter.js.html#line265">line 265</a> </li></ul></dd> </dl> </div> </article> </section> <section> <header> <h2>off</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="off"><span class="type-signature"></span>new off<span class="signature">(event, id, listener)</span><span class="type-signature"></span></h4> <div class="description"> Cancels an event listener based on an event name, id and listener function. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>event</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The event to cancel listener for.</td> </tr> <tr> <td class="name"><code>id</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The ID of the event to cancel listening for.</td> </tr> <tr> <td class="name"><code>listener</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">The event listener function used in the on() or once() call to cancel.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Emitter.js.html">Emitter.js</a>, <a href="Emitter.js.html#line236">line 236</a> </li></ul></dd> </dl> </div> </article> </section> <section> <header> <h2>off</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="off"><span class="type-signature"></span>new off<span class="signature">(event, listener)</span><span class="type-signature"> &rarr; {*}</span></h4> <div class="description"> Cancels the event listener for the passed event and listener function. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>event</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The event to cancel listener for.</td> </tr> <tr> <td class="name"><code>listener</code></td> <td class="type"> <span class="param-type">function</span> </td> <td class="description last">The event listener function used in the on() or once() call to cancel.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Emitter.js.html">Emitter.js</a>, <a href="Emitter.js.html#line197">line 197</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> </div> </article> </section> <section> <header> <h2>off</h2> </header> <article> <div class="container-overview"> <h4 class="name" id="off"><span class="type-signature"></span>new off<span class="signature">(event)</span><span class="type-signature"> &rarr; {*}</span></h4> <div class="description"> Cancels all event listeners for the passed event. </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>event</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last">The name of the event.</td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="Emitter.js.html">Emitter.js</a>, <a href="Emitter.js.html#line173">line 173</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> </div> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="deferEmit.html">deferEmit</a></li><li><a href="global.html#emit">emit</a></li><li><a href="emitStatic.html">emitStatic</a></li><li><a href="emitStaticId.html">emitStaticId</a></li><li><a href="off.html">off</a></li><li><a href="on.html">on</a></li><li><a href="once.html">once</a></li><li><a href="willEmit.html">willEmit</a></li><li><a href="willEmitId.html">willEmitId</a></li></ul><h3>Global</h3><ul><li><a href="global.html#$main">$main</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon Oct 30 2017 16:01:17 GMT+0000 (GMT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>