When loading JavaScript libraries (like jQuery), they tend to create an object on the Window element.
I'm trying to work out how I can detect when the library has just loaded so I've gone down the path of trying to detect a property change on the window object...
window.addEventListener("DOMAttrModified", invalidate, false);
function invalidate(evt)
{
console.log('attrChange = ' + evt.attrChange);
}
... This doesn't work.
Perhaps someone knows of another way to solve both this solution and a mechanism to detect when an external library has loaded.
p.s. I have looked at the onload tag for the script tag but I'm concerned as it's not in the W3C.
p.p.s. Ultimately, I'm trying to implement a function where it is safe to use jQuery code.