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

method for retrieving list of listeners of given type

parent ce491433
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) {
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.
*
......
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