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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/instance.dart
diff --git a/pkg/polymer/lib/src/instance.dart b/pkg/polymer/lib/src/instance.dart
index 008792c1398daa6f369e2bf372b34ed0b5ba4838..188631bb05508d0405fe64b1b9f66d23164964a5 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -69,6 +69,11 @@ abstract class Polymer implements Element {
static int _preparingElements = 0;
+ static final Completer _ready = new Completer();
+ /// 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.
+ /// for use.
+ static Future get onReady => _ready.future;
+
PolymerDeclaration _declaration;
/** The most derived `<polymer-element>` declaration for this element. */
« 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