Added more code comments for #53

This commit is contained in:
Patrick Steele-Idem 2015-04-10 11:15:42 -06:00
parent 299a8f94b3
commit d4d3842194

View File

@ -194,7 +194,15 @@ TagHandlerNode.prototype = {
propsCode = _this.inputExpression;
} else {
// We need to generate code that merges in the attribute properties with
// the provided data object.
// the provided data object. We don't want to modify the existing
// data object provided by the user so first need to create a new
// empty object and then merge in the existing properties from the
// provided object. When then extend that object with the properties
// that came from the attributes.
//
// The generated code will be similar to the following:
//
// extend(extend({}, <input_expression>), <attr_props>);
var extendVar = template.addStaticVar('__extend', '__helpers.xt');
propsCode = extendVar + '(' +
extendVar + '({}, ' + _this.inputExpression + '), ' +