[thelist] Workaround for setAttribute bug in IE7?

Lee kowalkowski lee.kowalkowski at googlemail.com
Wed Dec 13 15:58:28 CST 2006

On 13/12/06, Matt Warden <mwarden at gmail.com> wrote:
> See my domnode.length example. It was in the message you replied to,
> but just in case:
> http://lists.evolt.org/archive/Week-of-Mon-20061211/186779.html

:-)  Your example doesn't illustrate how using setAttribute("length",
4) is any better than length=4 (which I think was your original
assertion).  Because on HTML DOM objects that actually have a length
attribute, they are read-only, both methods will fail!  If it isn't
read only, both methods would work, and yes, both methods would result
in the creation of an attribute.  Hardly the fault of a design

> It should only be "transparent to the user" if it's the only way to
> manipulate attributes, or if all other methods are similarly
> transparent.

What?  Because there's more than one method neither should be
transparent?  Doesn't make any sense.  One's explicit and one's
implicit, I don't have a problem with that, except for the occasional
browser bug.


More information about the thelist mailing list