| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Template code | 2 * Template code |
| 3 * | 3 * |
| 4 * A template is just a javascript structure. An element is represented as: | 4 * A template is just a javascript structure. An element is represented as: |
| 5 * | 5 * |
| 6 * [tag_name, {attr_name:attr_value}, child1, child2] | 6 * [tag_name, {attr_name:attr_value}, child1, child2] |
| 7 * | 7 * |
| 8 * the children can either be strings (which act like text nodes), other tem
plates or | 8 * the children can either be strings (which act like text nodes), other tem
plates or |
| 9 * functions (see below) | 9 * functions (see below) |
| 10 * | 10 * |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 } | 205 } |
| 206 target = target[components[i]]; | 206 target = target[components[i]]; |
| 207 } | 207 } |
| 208 target[components[components.length - 1]] = object; | 208 target[components[components.length - 1]] = object; |
| 209 } | 209 } |
| 210 | 210 |
| 211 function extend(array, items) | 211 function extend(array, items) |
| 212 { | 212 { |
| 213 Array.prototype.push.apply(array, items); | 213 Array.prototype.push.apply(array, items); |
| 214 } | 214 } |
| OLD | NEW |