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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 } | 815 } |
816 return receiverMirror.invoke(methodName, args).reflectee; | 816 return receiverMirror.invoke(methodName, args).reflectee; |
817 } | 817 } |
818 | 818 |
819 static MethodMirror _findMethod(ClassMirror type, Symbol name) { | 819 static MethodMirror _findMethod(ClassMirror type, Symbol name) { |
820 do { | 820 do { |
821 var member = type.declarations[name]; | 821 var member = type.declarations[name]; |
822 if (member is MethodMirror) return member; | 822 if (member is MethodMirror) return member; |
823 type = type.superclass; | 823 type = type.superclass; |
824 } while (type != null); | 824 } while (type != null); |
| 825 return null; // unreachable |
825 } | 826 } |
826 | 827 |
827 /** | 828 /** |
828 * Invokes a function asynchronously. | 829 * Invokes a function asynchronously. |
829 * This will call `Platform.flush()` and then return a `new Timer` | 830 * This will call `Platform.flush()` and then return a `new Timer` |
830 * with the provided [method] and [timeout]. | 831 * with the provided [method] and [timeout]. |
831 * | 832 * |
832 * If you would prefer to run the callback using | 833 * If you would prefer to run the callback using |
833 * [window.requestAnimationFrame], see the [async] method. | 834 * [window.requestAnimationFrame], see the [async] method. |
834 */ | 835 */ |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 if (_sub != null) { | 1150 if (_sub != null) { |
1150 if (_eventsLog.isLoggable(Level.FINE)) { | 1151 if (_eventsLog.isLoggable(Level.FINE)) { |
1151 _eventsLog.fine( | 1152 _eventsLog.fine( |
1152 'event.remove: [$_node].$_eventName => [$_model].$_path())'); | 1153 'event.remove: [$_node].$_eventName => [$_model].$_path())'); |
1153 } | 1154 } |
1154 _sub.cancel(); | 1155 _sub.cancel(); |
1155 _sub = null; | 1156 _sub = null; |
1156 } | 1157 } |
1157 } | 1158 } |
1158 } | 1159 } |
OLD | NEW |