| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 polymer; | 5 part of polymer; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Use this annotation to publish a field as an attribute. For example: | 8 * Use this annotation to publish a field as an attribute. For example: |
| 9 * | 9 * |
| 10 * class MyPlaybackElement extends PolymerElement { | 10 * class MyPlaybackElement extends PolymerElement { |
| (...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 } | 567 } |
| 568 | 568 |
| 569 unregisterObserver('${MirrorSystem.getName(name)}__array'); | 569 unregisterObserver('${MirrorSystem.getName(name)}__array'); |
| 570 } | 570 } |
| 571 // if the new value is an array, being observing it | 571 // if the new value is an array, being observing it |
| 572 if (value is ObservableList) { | 572 if (value is ObservableList) { |
| 573 if (_observeLog.isLoggable(Level.FINE)) { | 573 if (_observeLog.isLoggable(Level.FINE)) { |
| 574 _observeLog.fine('[$localName] observeArrayValue: register observer ' | 574 _observeLog.fine('[$localName] observeArrayValue: register observer ' |
| 575 '$name'); | 575 '$name'); |
| 576 } | 576 } |
| 577 var sub = (value as ObservableList).changes.listen((changes) { | 577 var sub = value.listChanges.listen((changes) { |
| 578 invokeMethod(callbackName, [old]); | 578 invokeMethod(callbackName, [old]); |
| 579 }); | 579 }); |
| 580 registerObserver('${MirrorSystem.getName(name)}__array', sub); | 580 registerObserver('${MirrorSystem.getName(name)}__array', sub); |
| 581 } | 581 } |
| 582 } | 582 } |
| 583 | 583 |
| 584 bool unbindProperty(String name) => unregisterObserver(name); | 584 bool unbindProperty(String name) => unregisterObserver(name); |
| 585 | 585 |
| 586 void unbindAllProperties() { | 586 void unbindAllProperties() { |
| 587 if (_propertyObserver != null) { | 587 if (_propertyObserver != null) { |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 | 1073 |
| 1074 class _PropertyValue { | 1074 class _PropertyValue { |
| 1075 Object oldValue, newValue; | 1075 Object oldValue, newValue; |
| 1076 _PropertyValue(this.oldValue); | 1076 _PropertyValue(this.oldValue); |
| 1077 } | 1077 } |
| 1078 | 1078 |
| 1079 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions { | 1079 class _PolymerExpressionsWithEventDelegate extends PolymerExpressions { |
| 1080 prepareBinding(String path, name, node) => | 1080 prepareBinding(String path, name, node) => |
| 1081 Polymer.prepareBinding(path, name, node, super.prepareBinding); | 1081 Polymer.prepareBinding(path, name, node, super.prepareBinding); |
| 1082 } | 1082 } |
| OLD | NEW |