Skip to content

Instantly share code, notes, and snippets.

@chadhietala
Last active October 5, 2017 08:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadhietala/864d1ec508eabed9f7b03ebeed93bf42 to your computer and use it in GitHub Desktop.
Save chadhietala/864d1ec508eabed9f7b03ebeed93bf42 to your computer and use it in GitHub Desktop.
<h1>Hello {{name}}!</h1>
// Compiled hello-world.hbs in old engine
(function() {
return {
meta: {
"revision": "Ember@1.13.5",
"loc": {
"source": null,
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
}
},
arity: 0,
cachedFragment: null,
hasRendered: false,
buildFragment: function buildFragment(dom) {
var el0 = dom.createDocumentFragment();
var el1 = dom.createElement("h1");
var el2 = dom.createTextNode("Hello ");
dom.appendChild(el1, el2);
var el2 = dom.createComment("");
dom.appendChild(el1, el2);
dom.appendChild(el0, el1);
return el0;
},
buildRenderNodes: function buildRenderNodes(dom, fragment, contextualElement) {
var morphs = new Array(1);
morphs[0] = dom.createMorphAt(dom.childAt(fragment, [0]),1,1);
return morphs;
},
statements: [
["content","name",["loc",[null,[1,10],[1,18]]]]
],
locals: [],
templates: []
};
}())
// Compiled hello-world.hbs in new engine
{
"statements": [
[
11,
"h1",
[]
],
[
13
],
[
0,
"Hello "
],
[
1,
[
26,
[
"name"
]
],
false
],
[
14
]
],
"locals": [],
"named": [],
"yields": [],
"hasPartials": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment