| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of $LIBRARYNAME; | 5 part of $LIBRARYNAME; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Lazy implementation of the child nodes of an element that does not request | 8 * Lazy implementation of the child nodes of an element that does not request |
| 9 * the actual child nodes of an element until strictly necessary greatly | 9 * the actual child nodes of an element until strictly necessary greatly |
| 10 * improving performance for the typical cases where it is not required. | 10 * improving performance for the typical cases where it is not required. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 } else { | 242 } else { |
| 243 for (var node in newNodes) { | 243 for (var node in newNodes) { |
| 244 this.insertBefore(node, refChild); | 244 this.insertBefore(node, refChild); |
| 245 } | 245 } |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 | 248 |
| 249 /** | 249 /** |
| 250 * Print out a String representation of this Node. | 250 * Print out a String representation of this Node. |
| 251 */ | 251 */ |
| 252 String toString() => localName == null ? | 252 String toString() => nodeValue == null ? super.toString() : nodeValue; |
| 253 (nodeValue == null ? super.toString() : nodeValue) : localName; | |
| 254 | 253 |
| 255 /** | 254 /** |
| 256 * Binds the attribute [name] to the [path] of the [model]. | 255 * Binds the attribute [name] to the [path] of the [model]. |
| 257 * Path is a String of accessors such as `foo.bar.baz`. | 256 * Path is a String of accessors such as `foo.bar.baz`. |
| 258 */ | 257 */ |
| 259 @Experimental | 258 @Experimental |
| 260 void bind(String name, model, String path) { | 259 void bind(String name, model, String path) { |
| 261 // TODO(jmesserly): should we throw instead? | 260 // TODO(jmesserly): should we throw instead? |
| 262 window.console.error('Unhandled binding to Node: ' | 261 window.console.error('Unhandled binding to Node: ' |
| 263 '$this $name $model $path'); | 262 '$this $name $model $path'); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 274 TemplateInstance _templateInstance; | 273 TemplateInstance _templateInstance; |
| 275 | 274 |
| 276 /** Gets the template instance that instantiated this node, if any. */ | 275 /** Gets the template instance that instantiated this node, if any. */ |
| 277 @Experimental | 276 @Experimental |
| 278 TemplateInstance get templateInstance => | 277 TemplateInstance get templateInstance => |
| 279 _templateInstance != null ? _templateInstance : | 278 _templateInstance != null ? _templateInstance : |
| 280 (parent != null ? parent.templateInstance : null); | 279 (parent != null ? parent.templateInstance : null); |
| 281 | 280 |
| 282 $!MEMBERS | 281 $!MEMBERS |
| 283 } | 282 } |
| OLD | NEW |