IE Better for Testing HTML

Sorry about the inflammatory title. Let me explain.

  <input type="checkbox" CHECKED">

See the error? Just an extra quote but it fails in IE 7 and works in Firefox and Safari.

Firefoxs' FireBug plugin represents the checkbox as perfectly formatted dispite the syntax problem. Safaris' developer plugin shows the checked attribute as checked"="" which looks weird but it still works.

So, do I want to test with a browser that can make crap look good? I think not. I want a strict validator of my rendered code so that I can be sure that it will work consistently in all places.

The other thing that we break in IE all the time is the missing var in the javascript variable declaration. Firefoxs' and Safaris' javascript interpreter just auto-allocate on first assignment but IE complains of an undefined variable. I think IE wins here as well enforcing the script standard more closely.

So, while I don't have any decent javascript debugger or DOM inspector, for validating your HTML/JavaScript, it a better solution. Then back to FireBug for the rest of your day.

No comments: