UNPKG

blinx

Version:

The Scalable JavaScript Application Framework

3,596 lines (935 loc) 44.5 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Global</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">Global</h1> <section> <header> <h2></h2> </header> <article> <div class="container-overview"> <dl class="details"> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="destroyInstance"><span class="type-signature"></span>destroyInstance<span class="type-signature"> :<a href="global.html#destroyModuleInstance">destroyModuleInstance</a></span></h4> <div class="description"> <p>Deprecating destroyModuleInstance for name consistency</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#destroyModuleInstance">destroyModuleInstance</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line530">line 530</a> </li></ul></dd> </dl> <h4 class="name" id="eventQ"><span class="type-signature"></span>eventQ<span class="type-signature"> :Object</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_store.js.html">interfaces/store.js</a>, <a href="interfaces_store.js.html#line72">line 72</a> </li></ul></dd> </dl> <h4 class="name" id="isBrowser"><span class="type-signature"></span>isBrowser<span class="type-signature"> :boolean</span></h4> <div class="description"> <p>{@todo reserved for future use}</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">boolean</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_store.js.html">interfaces/store.js</a>, <a href="interfaces_store.js.html#line54">line 54</a> </li></ul></dd> </dl> <h4 class="name" id="isServer"><span class="type-signature"></span>isServer<span class="type-signature"> :boolean</span></h4> <div class="description"> <p>{@todo reserved for future use}</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">boolean</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_store.js.html">interfaces/store.js</a>, <a href="interfaces_store.js.html#line60">line 60</a> </li></ul></dd> </dl> <h4 class="name" id="lifeCycleFlags"><span class="type-signature">(private, constant) </span>lifeCycleFlags<span class="type-signature"> :Object</span></h4> <div class="description"> <p>following fields</p> <ul> <li>booted: true </li> <li>rendered: false</li> <li>preRenderResolved: false</li> </ul> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Object</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="constants.js.html">constants.js</a>, <a href="constants.js.html#line58">line 58</a> </li></ul></dd> </dl> <h4 class="name" id="PubSubHelper"><span class="type-signature">(constant) </span>PubSubHelper<span class="type-signature"> :PubSub</span></h4> <div class="description"> <p>exported the Pub Sub Helper It sis not recommended to use pub sub helper directly. More helpful to use in case of creating Providers.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">PubSub</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="index.js.html">index.js</a>, <a href="index.js.html#line10">line 10</a> </li></ul></dd> </dl> <h4 class="name" id="subscriptions"><span class="type-signature"></span>subscriptions<span class="type-signature"></span></h4> <div class="description"> <p>To be used by pubsub {Object} List of all the subscriptions of all the events. Present in the format {&quot;eventName&quot;: {subscription object}}</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_store.js.html">interfaces/store.js</a>, <a href="interfaces_store.js.html#line66">line 66</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="_callRender"><span class="type-signature">(private) </span>_callRender<span class="signature">(module, placeholderResponse)</span><span class="type-signature"> &rarr; {Promise}</span></h4> <div class="description"> <p>Renders the module by calling Module.createModuleArena Changes the life cycle flag to rendered thereafter.</p> </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>module</code></td> <td class="type"> <span class="param-type">Module</span> </td> <td class="description last"><p>to be rendered.</p></td> </tr> <tr> <td class="name"><code>placeholderResponse</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line140">line 140</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="_callResolveRenderOn"><span class="type-signature">(private) </span>_callResolveRenderOn<span class="signature">(module, data)</span><span class="type-signature"></span></h4> <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>module</code></td> <td class="type"> <span class="param-type">Module</span> </td> <td class="description last"><p>to be rendered.</p></td> </tr> <tr> <td class="name"><code>data</code></td> <td class="type"> <span class="param-type">*</span> </td> <td class="description last"><p>the data to be passed to module while initialization</p> <p>Calls Module.resolveRenderOn method . This method is passed from the config for the module and after resolveRenderOn is resolved, lifecycle status is changed to &quot;preRenderResolved&quot;. The resolveRenderOn should return {Promise}</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line72">line 72</a> </li></ul></dd> </dl> <h4 class="name" id="_emitLifeCycleEvent"><span class="type-signature">(private) </span>_emitLifeCycleEvent<span class="signature">(moduleDetail, eventName)</span><span class="type-signature"></span></h4> <div class="description"> <p>Publishes the event when state of the module changes</p> </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>moduleDetail</code></td> <td class="type"> </td> <td class="description last"><p>[object] module</p></td> </tr> <tr> <td class="name"><code>eventName</code></td> <td class="type"> </td> <td class="description last"><p>[string]</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line36">line 36</a> </li></ul></dd> </dl> <h4 class="name" id="_listenForInitOn"><span class="type-signature">(private) </span>_listenForInitOn<span class="signature">()</span><span class="type-signature"> &rarr; {Promise}</span></h4> <div class="description"> <p>This function resolves the Promise if initOn is true and module is already rendered. Refer <a href="global.html#lifeCycleFlags">lifeCycleFlags</a> for initial lifecycle values. Calls <a href="global.html#_callResolveRenderOn">_callResolveRenderOn</a> if either case fails</p> </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>module.</code></td> <td class="type"> <span class="param-type">Module</span> </td> <td class="description last"><p>The module to be rendered.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line51">line 51</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> </dd> </dl> <h4 class="name" id="_lockEvents"><span class="type-signature">(private) </span>_lockEvents<span class="signature">(module, placeholderResponse)</span><span class="type-signature"></span></h4> <div class="description"> <p>Subscribes to all the events of type playAfterRender</p> </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>module</code></td> <td class="type"> <span class="param-type">Module</span> </td> <td class="description last"><p>to be rendered.</p></td> </tr> <tr> <td class="name"><code>placeholderResponse</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line108">line 108</a> </li></ul></dd> </dl> <h4 class="name" id="_onBreath"><span class="type-signature">(private) </span>_onBreath<span class="signature">(module, eventName)</span><span class="type-signature"></span></h4> <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>module</code></td> <td class="type"> </td> <td class="description last"><p>[Object] Blinx module</p></td> </tr> <tr> <td class="name"><code>eventName</code></td> <td class="type"> </td> <td class="description last"><p>[string]</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line23">line 23</a> </li></ul></dd> </dl> <h4 class="name" id="_registerModule"><span class="type-signature">(private) </span>_registerModule<span class="signature">(config, moduleName<span class="signature-attributes">opt</span>, instance<span class="signature-attributes">opt</span>, instanceConfig<span class="signature-attributes">opt</span>, path<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>config</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The configuration of the module to be created. Creates instance of Module and keeps it in Store.If the module has child modules then the child modules too will be registered.</p> <p>It must contain following properties <ul style="list-style: none;"> <li>1. moduleName {String} The unique name in the workspace of the module <li>2. module {Object}: It is the reference of module to be consumed <li>3. instanceConfig {Object}: the configuration to be passed for that particular module. It must contain following properties: <ul> <li>placeholders {Object} <li>container {String} Css selector of the container element. This should be unique. <li>listensTo {Array} [Optional] the list of events that the module will listen to. </ul> </ul> </p> <p>If the module has already been registered on the same path then registration would be skipped and a warning will be generated.</p> <p></p></td> </tr> <tr> <td class="name"><code>moduleName</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> config.moduleName </td> <td class="description last"><p>The unique name in the workspace of the module</p></td> </tr> <tr> <td class="name"><code>instance</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> config.module </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>instanceConfig</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> config.instanceConfig </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>path</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> "" </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line308">line 308</a> </li></ul></dd> </dl> <h4 class="name" id="_registerSubscription"><span class="type-signature">(private) </span>_registerSubscription<span class="signature">(module)</span><span class="type-signature"> &rarr; {*}</span></h4> <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>module</code></td> <td class="type"> <span class="param-type">Module</span> </td> <td class="description last"><p>The Module generated by <a href="global.html#_registerModule">_registerModule</a>. If the module listens to any event or if the module is instantiated based on an event then module is made to subscribe all the events.</p> <p>initOn will have following properties <ul> <li>eventName {String} The name of the event</li> <li>eventPublisher {String} [Optional] CSS selector of the publisher of the event to which the module is subscribing. The module listens to event from all the publishers if this field is not provided</li> <li>context {Object} [Optional] The context in which event is subscribed</li> <li>callback</li> {function} the callback method for the event </ul> </p> <p> listensTo {array} this is an array of objects (the events) to which the module subscribes <ul> <li>eventName {String} The name of the event</li> <li>eventPublisher {String} [Optional] CSS selector of the publisher of the event to which the module is subscribing. The module listens to event from all the publishers if this field is not provided</li> <li>context {Object} [Optional] The context in which event is subscribed</li> <li>callback {function} the callback method for the event</li> <li>{boolean} [once = false] The callback of the function that can only be called one time if true. Repeated event publish will have no effect.</li> <li>[type= &quot;PLAY_AFTER_RENDER&quot;] {EVENT_ENUM} the type of the event </li> </ul> </p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line247">line 247</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">*</span> </dd> </dl> <h4 class="name" id="_startExec"><span class="type-signature">(private) </span>_startExec<span class="signature">(patchModules, promiseArr)</span><span class="type-signature"></span></h4> <div class="description"> <p>Called after the module is registered. Responsible for rendering the module. The rendering will wait till the event occurs if initOn option is provided. </p> <p>This method contains four steps <ul> <li>call resolveRenderOn method and wait for the promise to be resolved (<a href="global.html#_callResolveRenderOn">_callResolveRenderOn</a>)</li> <li>subscribe to the events of type &quot;playAfterRender&quot;</li> <li>Render the module</li> </ul> </p> </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>patchModules</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last"><p>The array of modules to be rendered. Initially list is taken from moduleS</p></td> </tr> <tr> <td class="name"><code>promiseArr</code></td> <td class="type"> <span class="param-type">Array</span> </td> <td class="description last"><p>the array of promise objects</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line183">line 183</a> </li></ul></dd> </dl> <h4 class="name" id="attachListener"><span class="type-signature"></span>attachListener<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Created by anoof.shaikh on 03/01/17.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="devtool.js.html">devtool.js</a>, <a href="devtool.js.html#line5">line 5</a> </li></ul></dd> </dl> <h4 class="name" id="checkIfModuleHasInitOn"><span class="type-signature"></span>checkIfModuleHasInitOn<span class="signature">(moduleContext, EventName)</span><span class="type-signature"></span></h4> <div class="description"> <p>Check if the module has initOn</p> </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>moduleContext</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>the moduleContext object</p></td> </tr> <tr> <td class="name"><code>EventName</code></td> <td class="type"> <span class="param-type">String</span> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_pubsub.js.html">interfaces/pubsub.js</a>, <a href="interfaces_pubsub.js.html#line38">line 38</a> </li></ul></dd> </dl> <h4 class="name" id="createInstance"><span class="type-signature"></span>createInstance<span class="signature">(config)</span><span class="type-signature"> &rarr; {Promise|undefined}</span></h4> <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>config</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>The configuration of the module to be created. It must contain following properties</p> <ul style="list-style: none;"> <li>1. moduleName {String} The unique name in the workspace of the module <li>2. module {Object}: It is the reference of module to be consumed <li>3. instanceConfig: the configuration to be passed for that particular module. It must contain following properties: <ul> <li>placeholders {Object} <li>container {String} Css selector of the container element. This should be unique. <li>listensTo {Array} [Optional] the list of events that the module will listen to. </ul> </ul></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line483">line 483</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Resolves when all the modules are rendered.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Promise</span> | <span class="param-type">undefined</span> </dd> </dl> <h4 class="name" id="deleteInstance"><span class="type-signature"></span>deleteInstance<span class="signature">(id)</span><span class="type-signature"></span></h4> <div class="description"> <p>deletes the instance of the module. Removes the entry from the module store instance of Module</p> </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>id</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_store.js.html">interfaces/store.js</a>, <a href="interfaces_store.js.html#line16">line 16</a> </li></ul></dd> </dl> <h4 class="name" id="destroyModuleInstance"><span class="type-signature"></span>destroyModuleInstance<span class="signature">(module, context<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4> <div class="description"> <p>Destroys the module . Does the following</p> <ul> <li>removed DOM element</li> <li> Unsubscribes events.It calls Module.unsubscribe</li> <li> Removes the entry of module from module store </li> <li> Removes the entry of child modules from module store </li> </ul> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>module</code></td> <td class="type"> <span class="param-type">Array</span> | <span class="param-type">Object</span> </td> <td class="attributes"> </td> <td class="default"> </td> <td class="description last"><p>The module to be destroyed</p></td> </tr> <tr> <td class="name"><code>context</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> window </td> <td class="description last"><p>@todo . Reserved for future enhancement</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line414">line 414</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>true when module gets deleted successfully</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id="findInstance"><span class="type-signature"></span>findInstance<span class="signature">(name)</span><span class="type-signature"> &rarr; {Array}</span></h4> <div class="description"> <p>Finds all the instances of the module from the module store</p> </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>name</code></td> <td class="type"> </td> <td class="description last"><p>of the module to be searched</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_store.js.html">interfaces/store.js</a>, <a href="interfaces_store.js.html#line31">line 31</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>of all the instances of the module</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Array</span> </dd> </dl> <h4 class="name" id="insertInstance"><span class="type-signature"></span>insertInstance<span class="signature">(instance)</span><span class="type-signature"></span></h4> <div class="description"> <p>inserts the instance into the module store</p> </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>instance</code></td> <td class="type"> </td> <td class="description last"><p>of Module</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_store.js.html">interfaces/store.js</a>, <a href="interfaces_store.js.html#line7">line 7</a> </li></ul></dd> </dl> <h4 class="name" id="isGlobalPubsub"><span class="type-signature"></span>isGlobalPubsub<span class="signature">(instance)</span><span class="type-signature"></span></h4> <div class="description"> <p>Check if the event is subscribed or published using global pubsub</p> </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>instance</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>the instance object using which the pub sub is handled</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_pubsub.js.html">interfaces/pubsub.js</a>, <a href="interfaces_pubsub.js.html#line48">line 48</a> </li></ul></dd> </dl> <h4 class="name" id="isModuleRendered"><span class="type-signature"></span>isModuleRendered<span class="signature">(moduleContext)</span><span class="type-signature"></span></h4> <div class="description"> <p>Check if the module is rendered</p> </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>moduleContext</code></td> <td class="type"> <span class="param-type">Object</span> </td> <td class="description last"><p>the moduleContext object</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="interfaces_pubsub.js.html">interfaces/pubsub.js</a>, <a href="interfaces_pubsub.js.html#line29">line 29</a> </li></ul></dd> </dl> <h4 class="name" id="use"><span class="type-signature"></span>use<span class="signature">(middleware)</span><span class="type-signature"></span></h4> <div class="description"> <p>The middlewares are the additional functionalities that you can create in blinx. These are providers which enhances the basic functionalities. You can create your own provider too. The provider is generally in format export default function (module) { return { render: function(){ //your overridden logic } } } where module is the instance of the module passed evrytime a new instance is created and any of the default methods provided by the blinx can be overridden here example render</p> </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>middleware</code></td> <td class="type"> </td> <td class="description last"></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="blinx.js.html">blinx.js</a>, <a href="blinx.js.html#line523">line 523</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-interfaces_store.html">interfaces/store</a></li><li><a href="module-Module.html">Module</a></li><li><a href="The%2520publisher%2520subscriber%2520module%2520for%2520Blinx.%250AIt%2520is%2520responsible%2520for%2520the%2520communication%2520between%2520the%2520modules%2520through%2520eventsmodule_.html">The publisher subscriber module for Blinx. It is responsible for the communication between the modules through events</a></li></ul><h3>Classes</h3><ul><li><a href="module-Module-Module.html">Module</a></li></ul><h3>Global</h3><ul><li><a href="global.html#_callRender">_callRender</a></li><li><a href="global.html#_callResolveRenderOn">_callResolveRenderOn</a></li><li><a href="global.html#_emitLifeCycleEvent">_emitLifeCycleEvent</a></li><li><a href="global.html#_listenForInitOn">_listenForInitOn</a></li><li><a href="global.html#_lockEvents">_lockEvents</a></li><li><a href="global.html#_onBreath">_onBreath</a></li><li><a href="global.html#_registerModule">_registerModule</a></li><li><a href="global.html#_registerSubscription">_registerSubscription</a></li><li><a href="global.html#_startExec">_startExec</a></li><li><a href="global.html#attachListener">attachListener</a></li><li><a href="global.html#checkIfModuleHasInitOn">checkIfModuleHasInitOn</a></li><li><a href="global.html#createInstance">createInstance</a></li><li><a href="global.html#deleteInstance">deleteInstance</a></li><li><a href="global.html#destroyInstance">destroyInstance</a></li><li><a href="global.html#destroyModuleInstance">destroyModuleInstance</a></li><li><a href="global.html#eventQ">eventQ</a></li><li><a href="global.html#findInstance">findInstance</a></li><li><a href="global.html#insertInstance">insertInstance</a></li><li><a href="global.html#isBrowser">isBrowser</a></li><li><a href="global.html#isGlobalPubsub">isGlobalPubsub</a></li><li><a href="global.html#isModuleRendered">isModuleRendered</a></li><li><a href="global.html#isServer">isServer</a></li><li><a href="global.html#lifeCycleFlags">lifeCycleFlags</a></li><li><a href="global.html#PubSubHelper">PubSubHelper</a></li><li><a href="global.html#subscriptions">subscriptions</a></li><li><a href="global.html#use">use</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 Feb 06 2017 13:40:46 GMT+0530 (IST) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>