WebReflection / linkedom

A triple-linked lists based DOM implementation.
https://webreflection.medium.com/linkedom-a-jsdom-alternative-53dd8f699311
ISC License
1.62k stars 78 forks source link

`HTMLTimeElement` losts `dateTime` property #270

Closed TechQuery closed 1 month ago

TechQuery commented 2 months ago

Reproduce bug

import { parseHTML } from 'linkedom';

const { document } = parseHTML(
    '<time datetime="1989-06-03 16:00:00">A big event</time>'
);
const { dateTime } = document.querySelector('time');

console.log(dateTime);  // undefined in LinkeDOM

Web standard

https://developer.mozilla.org/en-US/docs/Web/API/HTMLTimeElement/dateTime

WebReflection commented 2 months ago

it's not lost, it's just not defined anywhere, there's no special treatment for the time element so this is a feature request, and this is how you'd do it: https://github.com/WebReflection/linkedom/blob/main/how-to-contribute.md#htmlclasses-contributions