I am working on a relatively large ECMAScript codebase (> 60,000 LOCs), and we tend to struggle a bit with error detection for our terrible friend Internet Explorer (especially 6 and 7).
At the moment, I am stuck in the problem for 3 days when my RIA looks great in Google Chrome, Firefox 3.6, Opera and Internet Explorer 8, but it doesn’t work when Internet Explorer 8 starts in IE7 mode (or with real IE-7) .
My question really is: how do you do this to identify code that will lead to an error in IE7?
I usually rely on JSLint, and I tend to catch the usual suspects (trailing commas, I hate you), but in this particular case, I just re-run linter for all my code, both source and minimized, and this does not give my usual suspects. So I suppose I mistakenly imagined that IE didn't like it (who knows, maybe I went crazy and used Array.map instead of dojo.map somewhere?), And it explodes in my face, creating nice messages about errors that are ("object object]" and "is null", where it should not be, so I assume that there was a failure up, which failed, and prevented the creation of this object).
I tried to take a look at the Google Closure Linter, but it does not give anything, and I do not think that the Google Closure compiler will be my savior either. Is there any tool (command line, web service or other) that can analyze / run the code as if it emulated IE so that we can get the corresponding errors?
Any advice is appreciated.
EDIT: Thanks for your help in trying to solve my problem so far, but I'm really just asking if there are tools that perform such checks, which means checking the feature set and syntax for a particular browser. In my opinion, this is something that is missing in the JS world (not so much for FF, or for Chrome, obviously, since their debuggers are a little more useful).
EDIT2: ( 3 ), , , , , , ( emacs , ... , ...). : IE , try catch, , . , , , , . Weird. .
, .