MVCoconut / coconut.vdom

Coconut rendering through virtual-dom.
The Unlicense
19 stars 8 forks source link

`<time>` tag: `datetime` attribute is stripped from the final rendering #42

Closed cedx closed 3 years ago

cedx commented 3 years ago

When I add a datetime attribute to a <time> element, this attribute never appears in the final HTML. View template:

<time datetime=${Date.now()}>Now!</time>

Rendered HTML:

<time>Now!</time>

When I query the element in JavaScript, its dateTime property is empty:

document.querySelector("time").dateTime.length; // => 0

Using coconut.ui 0.12.0 with coconut.vdom 0.10.0.

cedx commented 3 years ago

Ok, it's a typo in tink_domspec: datetime instead of dateTime. Cf. https://github.com/haxetink/tink_domspec/blob/master/src/tink/domspec/Attributes.hx#L30