My git commit for this afternoon, following 3 hours of debugging and work, contained the following description:
IE7 fixes. DAMN that browser is busted.
Look, I'm not going to go off on a rant, but there are lots of things that can be done to make debugging Javascript in the browser easier, and Microsoft (and the windows community) has done exactly none of them.
1. Javascript consoleHello? I'd like to see what the error is, and where it's happening. By default, all that IE gives you is the Gray Box of Doom that tells you the problem is on line 24696, but won't tell you which file it's referring to.
A quick Google query for IE7 javascript console does a good job at showing the general level of pain about this out there.
Firefox has a basic Javascript console built in. Open source 1, Microsoft 0.
2. Javascript debuggerMicrosoft Script Debugger is the only standalone tool available, and it's no longer supported by MS. The other options require installation of either Front Page or Visual Studio. Puh-lease.
Firebug is free for Firefox. Open source 2, Microsoft 0.
I did find a nice tool called DebugBar, but it's only available freely for personal use. Even when I test-drove it, though, most functionality doesn't work properly for dynamically-created DOM elements. So, anything you've created or updated via AJAX calls are not going to be debuggable by DebugBar. Lose! This is basically everything that excellent javascript frameworks and libraries like ExtJS, Dojo and Scriptaculous have been working towards for years.
3. Basic EcmaScript extensionsArray.forEach() doesn't work? That's been around since Ecmascript 1.6! That's right, IE7 still doesn't implement any of the crafty Array iterator methods.
I'm just going to point you at this terrific blog entry detailing the changelist for Microsoft Javascript support since 2001. (Hint: the changelist is empty.)
Got that? In seven years, IE has not improved its Javascript support one whit. Where were you in 2001?
Just. Effing. Boggling.
At the end of all that, which quite frankly made me more dumb than when I started, I found myself asking the question: "Can I get away without supporting IE in my product?"
The realistic answer is obvious, but doesn't the fact that I'm asking the question in the first place tell you that something is seriously busticated?
The details behind the Pit of Despair Known As Internet Explorer have been covered in way more detail (and by more knowledgable people) than I can hope to do. I'm just adding my voice to the chorus of "WTF?"s that are already out there.
If anyone knows of better tools for debugging a rich javascript application on IE7, puh-lease let me know.