Chromium Code Reviews| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 } | 332 } |
| 333 } | 333 } |
| 334 | 334 |
| 335 /** | 335 /** |
| 336 * Get a stream of models, whenever the model changes. | 336 * Get a stream of models, whenever the model changes. |
| 337 */ | 337 */ |
| 338 Stream<Node> get onModelChanged { | 338 Stream<Node> get onModelChanged { |
| 339 if (_modelChangedStream == null) { | 339 if (_modelChangedStream == null) { |
| 340 // Ensure the model is cached locally to minimize change notifications. | 340 // Ensure the model is cached locally to minimize change notifications. |
| 341 _model = model; | 341 _model = model; |
| 342 _modelChangedStream = new StreamController.broadcast(); | 342 _modelChangedStream = new StreamController(); |
| 343 } | 343 } |
| 344 return _modelChangedStream.stream; | 344 return _modelChangedStream.stream; |
|
Anders Johnsen
2013/04/15 10:22:34
.asBroadcastStream?
floitsch
2013/04/15 22:58:12
No. But this is not the correct fix...
| |
| 345 } | 345 } |
| 346 | 346 |
| 347 /** | 347 /** |
| 348 * Print out a String representation of this Node. | 348 * Print out a String representation of this Node. |
| 349 */ | 349 */ |
| 350 String toString() => localName == null ? | 350 String toString() => localName == null ? |
| 351 (nodeValue == null ? super.toString() : nodeValue) : localName; | 351 (nodeValue == null ? super.toString() : nodeValue) : localName; |
| 352 | 352 |
| 353 $!MEMBERS | 353 $!MEMBERS |
| 354 } | 354 } |
| OLD | NEW |