Bladeren bron

Added a read-only property EventCaller.watchedEvents which is an array of event names currently being listened for.

dev-tmpl
Bryan Miller 6 jaren geleden
bovenliggende
commit
162f6a2080
1 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  1. +7
    -0
      app/js/EventCaller.js

+ 7
- 0
app/js/EventCaller.js Bestand weergeven

@@ -20,6 +20,13 @@ export class EventCaller{
}

/**
* @type {Array[string]}
*/
get watchedEvents(){
return Object.keys(this.__listeners);
}

/**
* Returns true if the given callback is listening for the given event, and false otherwise.
* @param {string} eventName - The name of the event to check.
* @param {Function} callback - The function/method to check for

Laden…
Annuleren
Opslaan