

How can I get JavaScript to read server HTML and build objects off of it? - adambratt
http://stackoverflow.com/questions/22386214/whats-the-best-way-to-convert-server-side-html-into-a-javascript-mvc-on-page-lo

======
lhorie
afaict, you can't do what you're trying to do. You have annotate the HTML
somehow to indicate where the bindings were, reverse-engineer the data out of
the rendered template, and build a proper template from that so that you can
then use an off-the-shelf js templating engine. You might as well just use
standard handlebars and web services instead.

If the extra http request from the web service is a real concern (and not just
premature optimization), then you could dump the JSON data into a script tag
and send that together with the template.

