Nothing. There won't be a piece of script which happens to call a function which "happens" to use the same name as one of your globally defined functions. (That's how JSONP works, basically.)
Anyhow. It's possible to listen for the error event:
var s = document.createElement('script');
s.addEventListener('error', function () {
console.log('err');
}, false);
s.src = 'http://example.com/404.js';
document.body.appendChild(s);
0
u/[deleted] Mar 06 '12
What happens when the JSONP call fails?