Is there a way to subtly prioritize event listeners without changing the order they were added in? See code snippet:
var listener1 = function () {
console.log('@listener1');
},
listener2 = function () {
console.log('@listener2');
};
google.maps.event.addListener(map, 'idle', listener1);
google.maps.event.addListener(map, 'idle', listener2);
/*
* Need to prioritize the listeners: I want `listener2`
* to be called before `listener1`.
*/
//
//
Check out the JSFiddle here.