Is it ok to set custom properties on DOM elements, and rely on them persisting?
For example, given
&l
No.
Let's say 5 years ago you thought the property .contains was a good use-case for saying whether an element contained some special data.
So you wrote document.getElementById("someId").contains = true
Then you had checks like if (document.getElementByID("someId").contains)
Today that breaks because Node.prototype.contains is a method.
basically your code is not future safe.