DomTemplate Example
What if the data for the template isn't available when the template is run?
DomTemplate checks returned data for a 'then' function, and assumes that it's
a promise which needs resolving before use.
HTML
<script src="https://github.com/PAEz/domtemplate/raw/master/lib/domtemplate.js"></script>
<script src="https://github.com/PAEz/domtemplate/raw/master/lib/promise.js"></script>
<div id="ex10">${name}</div>
JavaScript
var p = new Promise();
template('ex10', {
name: p
});
p.resolve("Joe");