mixonic/htmlbars — pull request #1 by mixonic (2014-06-14 02:55:15+00:00)
Title: Svg more dom helper

Create morphs through the `DOMHelper` class. Give `DOMHelper` a `parseHTML` method.

@krisselden this is not contextual elements, just a precursor. Wanted to see if it was inline with the Morph-via-DOMHelper change you had discussed with @mmun before merging it into my branch.

Trying not to make that PR wander too far from a shared understanding. I want to be review-able.

Output is like:

```JavaScript
function anonymous(dom
/**/) {
return (function (){
var dom0;
function build() {
var el0 = dom0.createElement("div");
return el0;
}
var cachedFragment;
return function template(context, options) {
var optionsDom = options && options.dom;
if (dom0 === undefined || (optionsDom && dom0 !== optionsDom)) {
dom0 = optionsDom || dom;
cachedFragment = build();
}
var fragment = dom0.cloneNode(cachedFragment);
var hooks = options && options.hooks;
var helpers = options && options.helpers || {};
var morph0 = dom0.createMorph(fragment,-1,-1);
hooks.content(morph0, "name", context, [], {escaped:false}, helpers);
return fragment;
};
}())
}
```