You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But AFAIK, HTML5 would prefer the use of data- prefixed custom attributes. I am in a development environment that returns proxy objects instead of direct DOM references. The handler for this proxy is strict and does not pass back any value to the datetime attribute. If the target attribute were (optionally) data-datetime, that would work and be more HTML5-ish.
When using timeago.js with React and Typescript, you're unable to specify the datetime attribute (but you are able to specify any custom data-* attributes, as suggested by @jschrab).
Current fix for me was to just use the timeago-react package instead.
In dom.ts,
getDateAttribute(...)
fetches the customdatetime
attribute...But AFAIK, HTML5 would prefer the use of data- prefixed custom attributes. I am in a development environment that returns proxy objects instead of direct DOM references. The handler for this proxy is strict and does not pass back any value to the
datetime
attribute. If the target attribute were (optionally)data-datetime
, that would work and be more HTML5-ish.Perhaps...?
...for backwards compatibility? More validation is probably necessary for the above.
The text was updated successfully, but these errors were encountered: