app.html
<div class="app">
<script id="entry-template" type="text/x-handlebars-template">
<div class="entry">
<h1>{{title}}</h1>
<div class="body">
{{body}}
</div>
</div>
</script>
</div>
compile.js
var templateElement = document.getElementById('entry-template');
var source = templateElement.innerHTML;
var template = Handlebars.compile(source);
var data = {
title: 'hello',
body: 'body'
};
var compiledHTML = template(data);
var parser = new DOMParser();
var convertedHtml = parser.parseFromString(compiledHTML, 'text/xml');
templateElement.parentElement.appendChild(convertedHtml.documentElement);