I would like to know if this would be possible in javascript: i have an application, mainly developed in javascript. There are ajax calls fetching html content scattered all around the code.
I would like to create an object that listens whenever a load function is being called, and launch a function in that case (like displaying a preloader).
I know there are many load plugins but they all require to add their own code at every place where a load is launched. I would like to keep this separated, as it's easier to maintain.
Is that possible?