コード例 #1
0
ファイル: mediator.js プロジェクト: mrpau-eduard/kolibri
 /**
  * Method to unbind event listeners once they have been registered.
  * @param {string} event - the event name.
  * @param {KolibriModule} kolibriModule - object of KolibriModule class
  * @param {string} method - the name of the method of the KolibriModule object.
  */
 stopListening(event, kolibriModule, method) {
   // Allow an event to be unlistened to.
   const callback = ((this._callbackRegistry[kolibriModule.name] || {})[event] || {})[method];
   if (typeof callback !== 'undefined') {
     this._eventDispatcher.$off(event, callback);
     delete this._callbackRegistry[kolibriModule.name][event][method];
   }
 }
コード例 #2
0
ファイル: mediator.js プロジェクト: mrpau-eduard/kolibri
 /**
  * Proxy to the Vue object that is the global dispatcher.
  * Takes any arguments and passes them on.
  */
 off(...args) {
   this._eventDispatcher.$off(...args);
 }
コード例 #3
0
ファイル: mediator.js プロジェクト: mrpau-eduard/kolibri
 (this._asyncCallbackRegistry[kolibriModule.name] || []).forEach((async) => {
   this._eventDispatcher.$off(async.event, async.callback);
 });
コード例 #4
0
 off: () => EventBus.$off(event, callback),