05-28-2010 05:41 PM
I am trying to attach an onload, onerror, and onabort event listener to a script element:
Here is all the code I tried:
http://mikemas.beerisawesome.com/FetchScript.html
Not possible?
Yes I know there are many other ways to know when a script tag is done downloading such as a call back (JSONP) or polling for a namespace or use xmlhttprequests.
However the scripts are sometimes cached and sometimes not cached and sometimes they are on different domains and I maintain a library that doesn't know about that.
Another way to get the onload event I can imagine would be to make a JS proxy so I can always to an XMLHttpRequest but I really dont want to be in the business of making proxies.
Blackberry 5.0 Browser
05-29-2010 06:58 AM - edited 05-29-2010 06:58 AM
According to the HTML reference guide for 5.0:
onload is only for <body> and <frameset>
onerror and onabort are not supported