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

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

Issue 27307004: Converting Polymer's WebComponentsLoaded to an onReady future (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | pkg/polymer/lib/src/loader.dart » ('j') | 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 /** 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 _typesByName[name] = type; 62 _typesByName[name] = type;
63 // notify the registrar waiting for 'name', if any 63 // notify the registrar waiting for 'name', if any
64 _notifyType(name); 64 _notifyType(name);
65 } 65 }
66 66
67 /// The one syntax to rule them all. 67 /// The one syntax to rule them all.
68 static final BindingDelegate _polymerSyntax = new PolymerExpressions(); 68 static final BindingDelegate _polymerSyntax = new PolymerExpressions();
69 69
70 static int _preparingElements = 0; 70 static int _preparingElements = 0;
71 71
72 static final Completer _ready = new Completer();
73 /// Future indicating that the Polymer library has been loaded and is ready
Siggi Cherem (dart-lang) 2013/10/15 17:33:00 nit: - add empty line above comment - /// vs /**
blois 2013/10/15 17:36:38 Done.
74 /// for use.
75 static Future get onReady => _ready.future;
76
72 PolymerDeclaration _declaration; 77 PolymerDeclaration _declaration;
73 78
74 /** The most derived `<polymer-element>` declaration for this element. */ 79 /** The most derived `<polymer-element>` declaration for this element. */
75 PolymerDeclaration get declaration => _declaration; 80 PolymerDeclaration get declaration => _declaration;
76 81
77 Map<String, StreamSubscription> _elementObservers; 82 Map<String, StreamSubscription> _elementObservers;
78 bool _unbound; // lazy-initialized 83 bool _unbound; // lazy-initialized
79 Job _unbindAllJob; 84 Job _unbindAllJob;
80 85
81 bool get _elementPrepared => _declaration != null; 86 bool get _elementPrepared => _declaration != null;
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 /** 935 /**
931 * Base class for PolymerElements deriving from HtmlElement. 936 * Base class for PolymerElements deriving from HtmlElement.
932 * 937 *
933 * See [Polymer]. 938 * See [Polymer].
934 */ 939 */
935 class PolymerElement extends HtmlElement with Polymer, ObservableMixin { 940 class PolymerElement extends HtmlElement with Polymer, ObservableMixin {
936 PolymerElement.created() : super.created() { 941 PolymerElement.created() : super.created() {
937 polymerCreated(); 942 polymerCreated();
938 } 943 }
939 } 944 }
OLDNEW
« no previous file with comments | « no previous file | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698