Is there any way to capture URLs of currently loading resource in javascript. For example, if browser starts downloading a JS, CSS or IMG file then is there any way we can get notified which resource is being loaded?
Something Like:
window.onResourceLoad = function (e) {
alert(e.URL);
}
{ childList: true }, then filter the DOM tree for images & scripts (and any other elements you are interested in), set aloadingflag for each new element, and bind aloadlistener on those elements to remove the flag — however this is likely to be incredibly computationally expensive, full of quirks and only applicable to modern browsers.