by dmethvin · 14y ago · 0 comments
Line 0 script errors can be from dynamically loaded code, such as JSONP requests or `eval()` code.
Our browser tests include IE7, IE8, IE9, Safari, Firefox and Chrome. None of those errors are present in our tests. As you note, in many of the cases I could wrap the errors with notifications to the user.
But, really, if the google variable isn't loaded for a small set of users and I can't easily configure a test system that can reproduce it, I'm not going to take the time right now. I have too many other pressing things on my list.
if (typeof google !== "undefined") {
// run google code here
google.magic();
}