New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 655921 link

Starred by 6 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Feature

Blocking:
issue 651762



Sign in to add a comment

Implement <time> HTML element

Reported by sebastia...@gmail.com, Oct 14 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0

Steps to reproduce the problem:
The HTML <time> element[1] and its corresponding HTMLTimeElement interface should be implemented.

1. Go to data:text/html,<time datetime="2016-10-14">October 14, 2016</time><script>console.log(document.querySelector("time").dateTime)</script>
2. Open the DevTools console

What is the expected behavior?
The string "2016-10-14" should be logged to the console.

What went wrong?
"undefined" is logged to the console.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 56.0.2889.0  Channel: canary
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: Shockwave Flash 23.0 r0

According to different websites like MDN[2] or W3Schools[3] this element should already be supported by Chrome for long, though I doubt that was actually the case (and it was rather treated like a generic inline element).
A clarification on this would be welcome.

[1] http://w3c.github.io/html/textlevel-semantics.html#the-time-element
[2] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time#Browser_compatibility
[3] http://www.w3schools.com/tags/tag_time.asp
 
Components: Blink>DOM
Cc: domenic@chromium.org foolip@chromium.org
Components: -Blink>DOM Blink>HTML
Owner: dominicc@chromium.org
Status: WontFix (was: Unconfirmed)
FYI old discussion about this: https://groups.google.com/a/chromium.org/d/msg/blink-dev/gRBe04ji0Rk/xgx4ljz8yCMJ

I think we probably shouldn't do this now. A lot of the arguments in that thread are still valid, but if you look at Hixie's use cases, the table sorting one is no longer valid; CSS still doesn't have a way to style times.

Which browsers support this element?

Domenic, are you aware of other vendors' implementations of this or willingness/desire to remove it from HTML?
> Which browsers support this element?

Firefox 49 (and earlier) and Edge (tested in 38). Opera (as it's based on Blink) and IE 11 do not support it. I can't test Safari.

Sebastian
Cc: dominicc@chromium.org
Labels: -Pri-2 Pri-3
Owner: ----
Status: Available (was: WontFix)
Hmm, I looked and <time> is appearing on more pages. This may be something we should debate more broadly whether to add. Maybe we should add a use counter to Chrome so that we can see how often users are encountering it.

Comment 5 by tkent@chromium.org, Oct 16 2016

Labels: -Type-Bug Hotlist-Interop OS-Android OS-Chrome OS-Linux OS-Mac Type-Feature
Safari 10 has <time> support.
Also, we already have a UseCounter: https://www.chromestatus.com/metrics/feature/timeline/popularity/1100

It seems like a fairly trivial addition; just a single element interface with a single reflecting attribute property (dateTime). Given 3/4 browsers have this, it seems unlikely it will ever be removed from HTML; I think we should implement it. It might make a "good first patch" for someone.

Comment 7 by foolip@chromium.org, Oct 17 2016

If 3/4 engines already have it, then it's clear we should add it. I concluded in the intent thread from 2013 that "this will have to wait until it becomes required for site compat" but to reach interop is also valuable. The only other path forward would be to have it removed in spec and 3 engines, which doesn't seem like a good use of time.

Comment 8 by phistuck@gmail.com, Oct 17 2016

This may be a good candidate for Blink-In-JavaScript or V8 Extras or whatever, like <marquee> (since <time> is dead simple, I do not foresee any hurdles or bugs, unlike <marquee> which has many bugs in its current implementation :(().

Comment 9 by foolip@chromium.org, Oct 17 2016

I don't think that's a good idea, precisely because it's dead simple. Everything about it can be supported by the bindings generator, and being able to relegate it to elsewhere will not allow for any simplification.

Comment 10 by tkent@chromium.org, Jun 28 2017

Labels: Needs-BlinkIntent
chromestatus.com entry: https://www.chromestatus.com/feature/5633937149788160

Owner: shanmug...@samsung.com
Status: Assigned (was: Available)
Labels: -Needs-BlinkIntent
Intent approved.
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/e52E3t3ijHo

Comment 13 by tkent@chromium.org, Jul 26 2017

Blocking: 651762
Status: Started (was: Assigned)
I'm looking over a list of APIs shipped in all 3 other browsers for >6 months but not in Chrome and this is the first on the list.  Thank you for shipping it and making all the major engines agree!
Project Member

Comment 16 by bugdroid1@chromium.org, Aug 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cdb881164c3cbea2b9b810d25027f1742f5988c9

commit cdb881164c3cbea2b9b810d25027f1742f5988c9
Author: Shanmuga Pandi M <shanmuga.m@samsung.com>
Date: Wed Aug 09 09:09:26 2017

Implement <time> HTML element

spec:
https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-time-element

Intent to implement and ship:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/e52E3t3ijHo

Bug:  655921 
Change-Id: I637720dacbb957bf96b9d76f59abea57eee2677f
Reviewed-on: https://chromium-review.googlesource.com/600147
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Tim Volodine <timvolodine@chromium.org>
Commit-Queue: Shanmuga Pandi <shanmuga.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#492915}
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/android_webview/tools/system_webview_shell/test/data/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/custom-elements/spec/define-builtin-element.html
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/external/wpt/dom/nodes/Node-cloneNode-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/external/wpt/html/dom/interfaces-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/external/wpt/html/dom/reflection-text-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/external/wpt/html/semantics/interfaces-expected.txt
[delete] https://crrev.com/119f0fb7777ff5f0ff2a86246817906f723a5213/third_party/WebKit/LayoutTests/external/wpt/html/semantics/text-level-semantics/the-time-element/001-expected.txt
[add] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/html/text_level_semantics/time-rendering-expected.html
[add] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/html/text_level_semantics/time-rendering.html
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/virtual/stable/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/webexposed/element-instance-property-listing-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/Source/core/core_idl_files.gni
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/Source/core/html/BUILD.gn
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/Source/core/html/HTMLTagNames.json5
[add] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/Source/core/html/HTMLTimeElement.cpp
[add] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/Source/core/html/HTMLTimeElement.h
[add] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/Source/core/html/HTMLTimeElement.idl
[modify] https://crrev.com/cdb881164c3cbea2b9b810d25027f1742f5988c9/third_party/WebKit/Source/core/html/HTMLUnknownElement.cpp

Status: Fixed (was: Started)
Labels: M-62

Sign in to add a comment