I know there is this repository for binding an event handler as first to be executed. I would like to achieve the same with pure JavaScript, but I read here that it ain't possible to check for the event-listeners being attached to an element. If so, is there another way to do this (preferably cross-browser down to IE9)?
My usecase for this is to execute a event-handler before another one which I can't control as it is added by a JavaScript-framework. There might be better work-arounds for my specific case, but I would like to know, if there is a general solution to this problem.