Currently, I am working with a function called doSomething()
which can be triggered by various DOM events. Is it feasible to listen not just for an event, but for the exact moment when this function is executed?
To clarify - I am unable to modify the original function and therefore, I am seeking a solution that does not involve attaching another function to each of those events individually.