DomTemplate Example
If an element contains an 'if' attribute, then its value will be evaluated and if the result is 'falsey', then the entire element will be removed from the tree. This allows simple if statements.
HTML
<script src="https://github.com/PAEz/domtemplate/raw/master/lib/domtemplate.js"></script>
<div id="ex6">
<p if="${name}">Hi, ${name}</p>
</div>
JavaScript
template('ex6', {
name: 'Fred'
});