Index: lib/src/codegen.dart |
diff --git a/lib/src/codegen.dart b/lib/src/codegen.dart |
index b3dd9d5c808783393e142f034d15805817551e91..0eecb47e93fc638d99a28c58b1b1ad16b025f800 100644 |
--- a/lib/src/codegen.dart |
+++ b/lib/src/codegen.dart |
@@ -23,8 +23,11 @@ library $libraryName; |
$imports |
"""; |
+// TODO(sigmund): include only those imports that are used by the code. |
String get imports => """ |
-import 'dart:html' as autogenerated; |
+import 'dart:html' as autogenerated_html; |
+import 'dart:web_audio' as autogenerated_audio; |
+import 'dart:svg' as autogenerated_svg; |
import 'package:web_components/web_components.dart' as autogenerated; |
"""; |
@@ -80,7 +83,7 @@ $originalCode |
// Additional generated code |
/** Create the views and bind them to models. */ |
void init_autogenerated() { |
- var _root = autogenerated.document.body; |
+ var _root = autogenerated_html.document.body; |
$topLevelFields |
// Initialize fields. |