Closed Bug 1058391 Opened 12 years ago Closed 12 years ago

HTMLTimeElement#dateTime should reflect the textContent if the value attribute is omitted

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: caitpotter88, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Steps to reproduce: http://jsfiddle.net/wsjx89qh/ simple test case (with various example valid strings found in http://www.whatwg.org/specs/web-apps/current-work/multipage/semantics.html#the-time-element). Actual results: The `log(time.dateTime)` line causes the `<pre></pre>` element to log the @dateTime IDL attribute of the `<time>` element. The logged value of the dateTime property is the empty string. The eval `time.dateTime === time.textContent` returns "false". Expected results: The spec states: "The datetime value of a time element is the value of the element's datetime content attribute, if it has one, or the element's textContent, if it does not.". Thus, the logged value of the dateTime property should be equal to the textContent of the element. The eval `time.dateTime === time.textContent` should return "true".
Actually, I think I'm reading this wrong, it correctly reflects the content attribute. "The datetime value of the time element" is just an abstract concept used by the table sorting algorithm, this is probably not a bug.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.