The author's postscript was the most interesting part of the article for me. If there were some extra kind of document (defined in JSON, perhaps) that could be attached to an HTML document to supply definitions that would be entered into the DOM, it could be accessed natively from Javascript, and also inserted into the HTML and CSS standards with much less tweaking than a whole separate variable standard just for CSS. For example, it would be possible to simply extend the concept of HTML entities into "DOM entities", which could then be copied wholesale by CSS for a nice symmetry: you'd be able to use &(document.variables.foo); in both mark-up languages and have be replaced with the value of the DOM node document.variables.foo. (Actually, you could extend this even further, and just allow arbitrary inline JS in these DOM entities, which gets parsed as the value after their evaluation: &(document.variables.foo + 1). You could also avoid document.variables altogether, if you wish, and just set use &(1 + 1); or &(document.body.style.background-color); or anything else you like. Let's, therefore, call them <i>JS Entities</i>.)<p>The only big design decision would be whether to allow writing to document.variables from JS (or, to rephrase, whether to parse the JS entities permanently upon recognition into their textual values before parsing can continue, or to have them continue to exist as a special kind of DOM node—though rendered as their current textual equivalent—that will reflow the document if their dependent values are altered.)<p>If JS entities aren't parsed away, it would change the way we interact with the DOM entirely—we probably wouldn't bother defining any constants in CSS itself any more; we'd just inject them. It would reverse the data-flow between Javascript and mark-up, even beyond how much AJAX already has: we wouldn't need to set specific things in the DOM, but instead just have those DOM nodes be an observer of our actual, working value. For example, "document.body.styles.background-color = document.createVariableElement(spinner.color);" as a line of Javascript would make the background-color of the page "watch" the current value of the spinner. In fact, if this method were used, you technically wouldn't <i>need</i> a separate variables.json document, because you could just dynamically create all the JS entities <i>in</i> JS (which is probably how it should be.) However, you could create one on top of JS entities, if you wished, using a library.