News for hackers. Stuff that matters.
Re:Custom Properties as State by capableweb on Saturday January 09, 2021 @06:46AM (#25699599)
> Can you explain what the issue with this is?

The only issue I can think of is mixing code/data with styling information. Otherwise there is no "issue" per se.

> What does this circumvent that cannot be done with pure JS?

Nothing, it is just JS after all, and the idea that you can store data in other things than JS variables is not new (jQuery days we stored data in various attributes in the DOM to keep track of state). You could also store the same data in <title/> tag and get the same results. Not sure what the use case is, except it's a fun little hack.

Maybe this will spawn some new JS framework, nothing would surprise me anymore.

There are no comments on this comment yet.