Sat Jun 17 11:14:44 EDT 2017

DOM elements as objects

I like the ReactJS component idea.  Can this be approximated using
actual DOM elements and associated behavior?

As an example, take an SVG that needs to be animated somehow.
The SVG DOM element can be retrieved by:


To use this as the state of an object, some data would need to be
stored in it.  From browsing the web I learn this is OK apparently,
just a little dirty and old school...


Bottom line, prefix with "data-" to be HTML5 compliant.

To identify an object, the "id" attribute is fine.