This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15596 - option.value IDL attribute should return |text| IDL attribute instead of |textContent| when no value is set
Summary: option.value IDL attribute should return |text| IDL attribute instead of |tex...
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-17 17:49 UTC by Mounir Lamouri
Modified: 2012-02-07 00:57 UTC (History)
4 users (show)

See Also:


Attachments

Description Mounir Lamouri 2012-01-17 17:49:15 UTC
The difference between |text| and |textContent| being:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-option-text

For what I've seen, Gecko, Webkit and Presto doesn't follow the spec and return .text instead of .textContent when requesting option.value.
IE9 and IE10PP are returning .textContent when getting .value. However, it seems that .text is submitted instead of .value which is kind of odd.

By the way, wouldn't that be easier to simply say that value IDL attribute, when getting, should reflect the |value| of the element as explained here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#concept-option-value
Comment 1 Ian 'Hixie' Hickson 2012-02-07 00:56:15 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.

Demoes:
   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1323
   http://software.hixie.ch/utilities/js/live-dom-viewer/saved/1324

We can't reflect the #concept-option-value, "reflect" is defined in terms of content attributes.
Comment 2 contributor 2012-02-07 00:57:52 UTC
Checked in as WHATWG revision r6975.
Check-in comment: Match implementations better.
http://html5.org/tools/web-apps-tracker?from=6974&to=6975