I have push notifications in my JavaScript client app using EventSource. I can attach event listeners like this:
source.addEventListener('my_custom_event_type', function(e) {
console.log(e.data);
}, false);
But I want to monitor all events that are being pushed from the server (basically for debugging), so if some event is sent but it has no event listener I can easily find it. I mean, I don't want to just "ignore" all events that have no eventListeners binded.
I would expect to do something like this:
source.addEventListener('*', function(e) {
console.debug('Event with no listener attached: ', e);
}, false);
But the specification and tutorials like the one at html5rocks don't specify if this is possible or not.
In the other hand, it may be some firefox/chrome extension that allows to monitor all server events or something. Those things would really help on developing push notifications.
Thanks!