Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

18 řádky
375 B

  1. module.exports = {
  2. cbList: {},
  3. init: function () {
  4. for (let eventName in this.events) {
  5. let eventCb = this.events[eventName];
  6. this.cbList[eventName] = eventCb.bind(this);
  7. this.instance.eventEmitter.on(eventName, this.cbList[eventName]);
  8. }
  9. },
  10. destroy: function () {
  11. for (let e in this.cbList)
  12. this.instance.eventEmitter.off(e, this.cbList[e]);
  13. }
  14. };