Thomas Bruederli wrote:
So, plugins could bind to one (http_response) event and there just check for which action it's executed. Am I right?
But: what about the arguments? How to pass specific data from the server to a callback method? This is not so easy to solve with this approach.
What data? If we do:
this.triggerEvent('http_response', response);
we could do in plugin:
rcmail.addEventListener('http_response', function(evt, response) { alert(rcmail.env.task); alert(response.action); });