W3C home > Mailing lists > Public > public-html@w3.org > September 2009

Re: [html5] Event handler DOM attributes

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 2 Sep 2009 22:29:09 +0000 (UTC)
To: Jens Meiert <jens@meiert.com>
Cc: public-html@w3.org
Message-ID: <Pine.LNX.4.62.0909022227470.6775@hixie.dreamhostps.com>
On Fri, 28 Aug 2009, Jens Meiert wrote:
> >
> > The presentational markup wasn't included in HTML5 because it is 
> > unnecessarily media-dependent. Event handlers don't seem to have this 
> > problem. I don't think it makes sense to force authors to separate 
> > their usir interface logic from their user interface semantics. On the 
> > contrary, it seems preferable to keep them together.
> 
> For authoring convenience, maybe. For maintenance, no.

I would have thought they were the same.


> The problem is the same with presentational markup. If you hardwire 
> presentation into your documents, you very likely need to update 
> documents to change presentation. If you hardwire behavior (event 
> handling) into documents, you very likely need to update documents to 
> change behavior. Given that usually you’re dealing with more documents 
> (this includes dynamic templates) than style sheets or scripts, these 
> changes are more expensive.

Sure, there are limits to how much you should put into the markup. But 
things like <button onclick=""> and <body onload> or <img onload> are 
pretty harmless as far as that goes -- you're not going to change a button 
to stop responding to clicks unless you also change a lot more.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 2 September 2009 22:26:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:48 GMT