tildeio/htmlbars — pull request #50 by mixonic (2014-06-21 01:42:23+00:00)
Title: Refactor DOMHelper, introduce contextualElement

Template execution now requires both hooks and the dom to be passed in. For example:

template(context, {hooks: hooks, dom: new DOMHelper()});

Optionally, you can provide a contextualElement to the DOMHelper. This will allow it to resolve un-escaped HTML rendering issues:

var template = compile('{{{html}}}');
var tableElement = document.createElement('table');
template({html: '
Yo
', {
hooks: hooks,
dom: new DOMHelper(tableElement)
});

This code also prepares htmlbars for changing namespaces based on the AST.