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

Anne van Kesteren fora at annevankesteren.nl
Thu Jan 12 05:31:30 PST 2006


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
<http://annevankesteren.nl/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20060112/3be9be7e/attachment.html>


More information about the whatwg mailing list