Index: sdk/lib/js/dart2js/js_dart2js.dart |
diff --git a/sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/js/dart2js/js_dart2js.dart |
index 7f806b73f3744794eeca4b725e61093b6cf12008..64b4af0b4771972ac4ac9b773480ece956d914b8 100644 |
--- a/sdk/lib/js/dart2js/js_dart2js.dart |
+++ b/sdk/lib/js/dart2js/js_dart2js.dart |
@@ -5,11 +5,9 @@ |
library dart.js; |
import 'dart:_foreign_helper' show JS; |
-import 'dart:_js_helper' show convertDartClosureToJS; |
+import 'dart:_js_helper' show Primitives, convertDartClosureToJS; |
-JsObject get context { |
- return new JsObject._fromJs(JS('=Object', 'window')); |
-} |
+final JsObject context = new JsObject._fromJs(Primitives.computeGlobalThis()); |
JsObject jsify(dynamic data) => data == null ? null : new JsObject._json(data); |