Index: pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart |
index 222b1c6293fa443506a3f82cc851627a9864d6fd..3d4e9ba4fa4ccbde30f52b50d2c6c02ae2781c3e 100644 |
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart |
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/fragment_emitter.dart |
@@ -345,6 +345,9 @@ var #staticStateDeclaration = {}; |
// Native-support uses setOrUpdateInterceptorsByTag and setOrUpdateLeafTags. |
#nativeSupport; |
+// Sets up the js-interop support. |
+#jsInteropSupport; |
+ |
// Invokes main (making sure that it records the 'current-script' value). |
#invokeMain; |
})() |
@@ -497,6 +500,9 @@ class FragmentEmitter { |
'nativeSupport': program.needsNativeSupport |
? emitNativeSupport(fragment) |
: new js.EmptyStatement(), |
+ 'jsInteropSupport': backend.jsInteropAnalysis.enabledJsInterop |
+ ? backend.jsInteropAnalysis.buildJsInteropBootstrap() |
+ : new js.EmptyStatement(), |
'invokeMain': fragment.invokeMain, |
}); |
} |