@samitouri / QOS-React-2 / commits / 4ead6b5305

Treat <time> tag as a normal HTML tag. (#19951)

<time> tag has been supported by Chrome since Chrome 62.0. Remove workarounds which were in place to avoid friction with versions before Chrome 62. Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>

Shivam Sandbhor committed Oct 6, 2020 at 07:45 UTC 4ead6b53057ee6c6129a6d2f6e264232130b1fce
2 files changed -14
packages/react-dom/src/__tests__/ReactDOMComponent-test.js
-9
@@ -1273,10 +1273,6 @@ describe('ReactDOMComponent', () => {
1273 if (this instanceof window.HTMLUnknownElement) {
1274 return '[object HTMLUnknownElement]';
1275 }
1276 - // Special case! Read explanation below in the test.
1277 - if (this instanceof window.HTMLTimeElement) {
1278 - return '[object HTMLUnknownElement]';
1279 - }
1276 return realToString.apply(this, arguments);
1277 };
1278 Object.prototype.toString = wrappedToString; // eslint-disable-line no-extend-native
@@ -1289,11 +1285,6 @@ describe('ReactDOMComponent', () => {
1285 'The tag <foo> is unrecognized in this browser',
1286 );
1287 ReactTestUtils.renderIntoDocument(<foo />);
1292 - // This is a funny case.
1293 - // Chrome is the only major browser not shipping <time>. But as of July
1294 - // 2017 it intends to ship it due to widespread usage. We intentionally
1295 - // *don't* warn for <time> even if it's unrecognized by Chrome because
1296 - // it soon will be, and many apps have been using it anyway.
1288 ReactTestUtils.renderIntoDocument(<time />);
1289 // Corner case. Make sure out deduplication logic doesn't break with weird tag.
1290 expect(() =>
packages/react-dom/src/client/ReactDOMComponent.js
-5
@@ -112,11 +112,6 @@ let normalizeHTML;
112
113 if (__DEV__) {
114 warnedUnknownTags = {
115 - // Chrome is the only major browser not shipping <time>. But as of July
116 - // 2017 it intends to ship it due to widespread usage. We intentionally
117 - // *don't* warn for <time> even if it's unrecognized by Chrome because
118 - // it soon will be, and many apps have been using it anyway.
119 - time: true,
115 // There are working polyfills for <dialog>. Let people use it.
116 dialog: true,
117 // Electron ships a custom <webview> tag to display external web content in