W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2006

[whatwg] [wf2] checked, defaultChecked and "checked"

From: Anne van Kesteren <fora@annevankesteren.nl>
Date: Thu, 12 Jan 2006 14:31:30 +0100
Message-ID: <20060112143130.mmew8jlzka1cccw0@webmail.annevankesteren.nl>
Here are the results from some testing in Firefox 1.5, Opera 8.5 (same in Opera
9 (internal version)) and Internet Explorer 6.

The defaultChecked DOM attribute and the "checked" content attribute are
identical in Firefox and Opera.

Internet Explorer only sets defaultChecked to true when the control has a
"checked" attribute set at _parsing time_. Adding a "checked" attribute
dynamically does not change the state of defaultChecked.

Modifying the checked DOM attribute only checks and unchecks the checkbox. It
does not affect the defaultChecked DOM attribute. This is consistent in all
three browsers.

In Firefox and Opera setting and removing the "checked" attribute is reflected
in the checkbox. (It gets checked and unchecked.) In Internet Explorer only
setting the "checked" attribute is reflected (the checkbox gets checked).
Removing the attribute does not change the state.

Testcase I used is attached. Anyone with results from other browsers?

Ian, any chance this can be incorperated in WF2 at some point so this gets
consistent? It is more or less important for dynamically testing the CSS
pseudo-classes as well as for interop obviously.

Anne van Kesteren
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20060112/3be9be7e/attachment.html>
Received on Thursday, 12 January 2006 05:31:30 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:44 UTC