On 01/02/2007, at 12:30 PM, Karl Swedberg wrote:

> I'd love to hear your opinions about this. With HTML/CSS stuff, I'm  
> obsessed with standards and such. And one of the things that has  
> always really attracted me to jQuery is its unobtrusiveness. I also  
> read Jeremy Keith's DOM Scripting book and really appreciated his  
> approach -- which is similar to what this commenter is suggesting.  
> But I also love the super-fast development that can be done with  
> jQuery and don't want to have to give that up if it's just a matter  
> of someone's aesthetic sensibility being offended. I guess I just  
> want to do the right thing.
>

Here is my current understanding of this issue. (Anyone, please  
correct me where I am wrong). The main reason why innerHTML is said  
to be evil is that it is not part of the standards. Therefore, if a  
vendor creates a new user agent they may not decide to implement  
support for it, leaving your web app or site broken and probably  
adversely affected accessibility-wise. Whilst it is hard to imagine  
any new browsers not supporting innerHTML as it is what some people  
call a "pseudo-standard", I suppose it is not as hard to imagine  
various new mobile devices and other unconventional browsers  
supporting JavaScript but not what they may consider "extras" such as  
innerHTML.
Also, if you ever want to serve the page as XHTML your script will  
not work because innerHTML does not work for XML pages of course.
Personally, I have just resigned to using it when using jQuery  
because the ease and speed benefits you mentioned are just too darn  
seductive. The code is also much more readable so less-techy people  
can possibly change the output easier.
I'll be interested to hear what other people think about this.

Joel Birch.

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to