On 2009-07-26 06:56, Mike Shaver wrote:
And yet, tons of inline event handler attribute values on the web omit
their trailing semicolons...as a matter of style.

Yes, one of 1000 perhaps violates JSLint rules on purpose. But I'd wager my right arm that the overwhelming majority using inline event handlers simply do not know or care about best practices. They are following bad and outdated advice. They probably browser sniff too, or still check for support for document.layers. Or have Visual Studio generate all the ghastly code using default settings, including 40 kB viewstates. And use font tags.

Mike, I know what you are doing at Mozilla, and have a ton of respect for you. But I fail to see how you could misunderstand my analogy to JSLint. Or do you suggest that Doug Crockford should drop manual semi-colon insertion from that tool?

Commenting on this thread as a whole now:

Three kinds of attribute values have been identified:
- Those that can have multiple words, e.g. class, alt, title, value...
- Those that can have just one word or an integer, e.g. width, length...
- Boolean attributes, that can be shortened in HTML.

Today teachers like me use (false) XHTML to enforce quotation marks for all three cases, because we've seen the pedagogic benefit (and frankly grown tired of looking over the shoulders of our students and say for the millionth time "you've forgotten to quote that alt attribute value").

I actually thought that having a tool that could enforce XHTML-ish rules for the first (and perhaps second) category above, while still leaving boolean attributes alone, would be seen as a benefit, not as a burden.


--
Keryx Web (Lars Gunther)
http://keryx.se/
http://twitter.com/itpastorn/
http://itpastorn.blogspot.com/

Reply via email to