mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Added more code comments for #53
This commit is contained in:
parent
299a8f94b3
commit
d4d3842194
@ -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 + '), ' +
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user