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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 // locate nodes with id and store references to them in this.$ hash | 311 // locate nodes with id and store references to them in this.$ hash |
312 marshalNodeReferences(root); | 312 marshalNodeReferences(root); |
313 // TODO(jmesserly): port this | 313 // TODO(jmesserly): port this |
314 // set up pointer gestures | 314 // set up pointer gestures |
315 // PointerGestures.register(root); | 315 // PointerGestures.register(root); |
316 } | 316 } |
317 | 317 |
318 /** Locate nodes with id and store references to them in [$] hash. */ | 318 /** Locate nodes with id and store references to them in [$] hash. */ |
319 void marshalNodeReferences(Node root) { | 319 void marshalNodeReferences(Node root) { |
320 if (root == null) return; | 320 if (root == null) return; |
321 for (var n in (root as dynamic).queryAll('[id]')) { | 321 for (var n in (root as dynamic).querySelectorAll('[id]')) { |
322 $[n.id] = n; | 322 $[n.id] = n; |
323 } | 323 } |
324 } | 324 } |
325 | 325 |
326 void attributeChanged(String name, String oldValue, String newValue) { | 326 void attributeChanged(String name, String oldValue, String newValue) { |
327 if (name != 'class' && name != 'style') { | 327 if (name != 'class' && name != 'style') { |
328 attributeToProperty(name, newValue); | 328 attributeToProperty(name, newValue); |
329 } | 329 } |
330 } | 330 } |
331 | 331 |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 if (_sub != null) { | 1150 if (_sub != null) { |
1151 if (_eventsLog.isLoggable(Level.FINE)) { | 1151 if (_eventsLog.isLoggable(Level.FINE)) { |
1152 _eventsLog.fine( | 1152 _eventsLog.fine( |
1153 'event.remove: [$_node].$_eventName => [$_model].$_path())'); | 1153 'event.remove: [$_node].$_eventName => [$_model].$_path())'); |
1154 } | 1154 } |
1155 _sub.cancel(); | 1155 _sub.cancel(); |
1156 _sub = null; | 1156 _sub = null; |
1157 } | 1157 } |
1158 } | 1158 } |
1159 } | 1159 } |
OLD | NEW |