Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(661)

Side by Side Diff: pkg/polymer/lib/src/instance.dart

Issue 270693005: Remove unused import in polymer, fix comment. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/polymer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /// Use this annotation to publish a field as an attribute. For example: 7 /// Use this annotation to publish a field as an attribute. For example:
8 /// 8 ///
9 /// class MyPlaybackElement extends PolymerElement { 9 /// class MyPlaybackElement extends PolymerElement {
10 /// // This will be available as an HTML attribute, for example: 10 /// // This will be available as an HTML attribute, for example:
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 return true; 619 return true;
620 } 620 }
621 621
622 void unregisterObservers() { 622 void unregisterObservers() {
623 if (_observers == null) return; 623 if (_observers == null) return;
624 for (var sub in _observers.values) sub.cancel(); 624 for (var sub in _observers.values) sub.cancel();
625 _observers.clear(); 625 _observers.clear();
626 _observers = null; 626 _observers = null;
627 } 627 }
628 628
629 /// Bind a [property] in this object to a [path] in model. *Note* in Dart it 629 /// Bind the [name] property in this element to [bindable]. *Note* in Dart it
630 /// is necessary to also define the field: 630 /// is necessary to also define the field:
631 /// 631 ///
632 /// var myProperty; 632 /// var myProperty;
633 /// 633 ///
634 /// ready() { 634 /// ready() {
635 /// super.ready(); 635 /// super.ready();
636 /// bindProperty(#myProperty, this, 'myModel.path.to.otherProp'); 636 /// bindProperty(#myProperty,
637 /// new PathObserver(this, 'myModel.path.to.otherProp'));
637 /// } 638 /// }
638 Bindable bindProperty(Symbol name, Bindable bindable) { 639 Bindable bindProperty(Symbol name, Bindable bindable) {
639 // Dart note: normally we only reach this code when we know it's a 640 // Dart note: normally we only reach this code when we know it's a
640 // property, but if someone uses bindProperty directly they might get a 641 // property, but if someone uses bindProperty directly they might get a
641 // NoSuchMethodError either from the getField below, or from the setField 642 // NoSuchMethodError either from the getField below, or from the setField
642 // inside PolymerBinding. That doesn't seem unreasonable, but it's a slight 643 // inside PolymerBinding. That doesn't seem unreasonable, but it's a slight
643 // difference from Polymer.js behavior. 644 // difference from Polymer.js behavior.
644 645
645 if (_bindLog.isLoggable(Level.FINE)) { 646 if (_bindLog.isLoggable(Level.FINE)) {
646 _bindLog.fine('bindProperty: [$bindable] to [${localName}].[name]'); 647 _bindLog.fine('bindProperty: [$bindable] to [${localName}].[name]');
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 if (_sub != null) { 1021 if (_sub != null) {
1021 if (_eventsLog.isLoggable(Level.FINE)) { 1022 if (_eventsLog.isLoggable(Level.FINE)) {
1022 _eventsLog.fine( 1023 _eventsLog.fine(
1023 'event.remove: [$_node].$_eventName => [$_model].$_path())'); 1024 'event.remove: [$_node].$_eventName => [$_model].$_path())');
1024 } 1025 }
1025 _sub.cancel(); 1026 _sub.cancel();
1026 _sub = null; 1027 _sub = null;
1027 } 1028 }
1028 } 1029 }
1029 } 1030 }
OLDNEW
« no previous file with comments | « pkg/polymer/lib/polymer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698