Re: About dropping the style attribute

Jens Meiert wrote:

>> I've realized now that the current spec drops the style attribute for
>> all elements except for the <font>, but I can't understand the
>> reasoning behind those decisions.
>
> And neither do I, and according to my experience as well as the  
> discussion on that subject there are several cases why we need to  
> keep the "style" attribute.

Some of the common JavaScript libraries use this for performance and  
consistency reasons, too. Prototype, for example, uses the [style] to  
toggle style values for a couple reasons. 1) So it doesn't have to  
override !important styles, and 2) because when checking the  
displayed state, performance of getAttribute is much faster than  
getComputedStyle.

James

Received on Tuesday, 26 June 2007 18:14:43 UTC