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

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..c96aca005444afcf639193422149cb25fb94ab80 100644
--- a/pkg/polymer/lib/src/instance.dart
+++ b/pkg/polymer/lib/src/instance.dart
@@ -69,6 +69,14 @@ 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
+ * 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