treant-js icon indicating copy to clipboard operation
treant-js copied to clipboard

data attribute not setting

Open lekhnath opened this issue 6 years ago • 2 comments

when using innerHTML value for node {'text': {'data-attribute': 'some value'}} does not works. It does not set data-attribute for that node. Why is that? Is there any work around?

lekhnath avatar Oct 03 '18 13:10 lekhnath

I don't know if your issue was the same as mine; however, what I had to do to have the data attributes appear is perform:

{'text': {'node-data-avg': 1000}}

as an example. I.e., prefix with node-.

AndTheDaysGoBy avatar May 21 '20 05:05 AndTheDaysGoBy

This is a super old post, but i faced the same issue here in 2023, turns out, the "release" and also cdnjs have not been updated in forever. however, if you pull the Treat.js file from github directly, it does seem to work (for me).

moral of the story, don't trust cdnjs or even the github releases to be up to date.

TimBurris avatar Nov 01 '23 16:11 TimBurris