| Index: sdk/lib/_internal/lib/foreign_helper.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/lib/foreign_helper.dart (revision 26873)
|
| +++ sdk/lib/_internal/lib/foreign_helper.dart (working copy)
|
| @@ -255,3 +255,17 @@
|
| * externally initialized elements.
|
| */
|
| void JS_EFFECT(Function code) { code(null); }
|
| +
|
| +/**
|
| + * Use this class for creating constants that hold JavaScript code.
|
| + * For example:
|
| + *
|
| + * const constant = JS_CONST('typeof window != "undefined");
|
| + *
|
| + * This code will generate:
|
| + * $.JS_CONST_1 = typeof window != "undefined";
|
| + */
|
| +class JS_CONST {
|
| + String code;
|
| + const JS_CONST(this.code);
|
| +}
|
|
|