Before element.setUserData is deprecated in Firefox, I use it to store and attach some data to one element. But now from the doc:
https://developer.mozilla.org/en-US/docs/Web/API/Node.setUserData
We can see that this API is deprecated and Element.dataset is preferred.
I use element.setUserData to store object or array, but element.dataset can only store string.
So is there any other replacement for store object and attach it to an element?