Index: runtime/observatory/web/main.dart |
diff --git a/runtime/observatory/web/main.dart b/runtime/observatory/web/main.dart |
index 238bf97217a8bc40f0b7328393e4155747e8177b..41f3dc74c2c0f43a978edec47cc86685153cc87b 100644 |
--- a/runtime/observatory/web/main.dart |
+++ b/runtime/observatory/web/main.dart |
@@ -4,8 +4,9 @@ |
import 'package:logging/logging.dart'; |
import 'package:polymer/polymer.dart'; |
+import 'package:observatory/elements.dart'; |
-main() { |
+main() async { |
Logger.root.level = Level.INFO; |
Logger.root.onRecord.listen((LogRecord rec) { |
if (rec.level == Level.WARNING && |
@@ -17,13 +18,10 @@ main() { |
} |
print('${rec.level.name}: ${rec.time}: ${rec.message}'); |
}); |
+ await initElements(); |
Logger.root.info('Starting Observatory'); |
- initPolymer().then((zone) { |
- Logger.root.info('Polymer initialized'); |
- // Code here is in the polymer Zone, which ensures that |
- // @observable properties work correctly. |
- Polymer.onReady.then((_) { |
- Logger.root.info('Polymer elements have been upgraded'); |
- }); |
- }); |
+ await initPolymer(); |
+ Logger.root.info('Polymer initialized'); |
+ await Polymer.onReady; |
+ Logger.root.info('Polymer elements have been upgraded'); |
} |