Skip to content
Snippets Groups Projects
Commit bcdfc7c6 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

method for retrieving list of listeners of given type

parent 82a968ff
No related branches found
No related tags found
2 merge requests!115Resolve "admin panel should use API",!114Resolve "admin panel should use API"
...@@ -159,6 +159,13 @@ ObjectWithListeners.prototype.callListeners = function(type, arg) { ...@@ -159,6 +159,13 @@ ObjectWithListeners.prototype.callListeners = function(type, arg) {
return Promise.all(promises); return Promise.all(promises);
}; };
ObjectWithListeners.prototype.getListeners = function(type) {
if (this._validListeners[type] === undefined) {
throw new Error("Unknown listener type: " + type);
}
return this._validListeners[type];
};
/** /**
* Fires property change listeners for a given property name. * Fires property change listeners for a given property name.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment