- From: <bugzilla@jessica.w3.org>
- Date: Tue, 27 Jan 2015 11:08:57 +0000
- To: public-html-admin@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=27904
Bug ID: 27904
Summary: normalize behavior of select options'
.defaultSelected, and add .defaultValue
Product: HTML WG
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P2
Component: HTML5 spec
Assignee: dave.null@w3.org
Reporter: netmosfera@gmail.com
QA Contact: public-html-bugzilla@w3.org
CC: mike@w3.org, public-html-admin@w3.org,
public-html-wg-issue-tracking@w3.org
since select-one has no "none-selected" state
<select>
<option>foo</option>
<option>bar</option>
</select>
selectelement.options[0].defaultSelected should return true even if the
"selected" attribute on the first <option> wasn't declared explicitly
basically, it should behave as writing:
<select>
<option selected>foo</option>
<option>bar</option>
</select>
------------------
<select>
<option selected>foo</option>
<option selected>bar</option>
</select>
selectelement.options[1].defaultSelected should return false, since it was
declared in a <select>-one
------------------
additionally, since HTMLSelectElement has the "value" property, I'd suggest to
add "defaultValue" as well, for consistency:
<select>
<option selected>foo</option>
</select>
console.log(selectElement.value); // "foo"
console.log(selectElement.defaultValue); // undefined, currently not
implemented
--
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 27 January 2015 11:09:00 UTC