Chromium Code Reviews| Index: sdk/lib/js/dartium/js_dartium.dart |
| diff --git a/sdk/lib/js/dartium/js_dartium.dart b/sdk/lib/js/dartium/js_dartium.dart |
| index 1fd5bf541921bdf23226a9cb0ec02b48f5810100..d9da481b25ffcff1058894d4f01b391b2c3b14eb 100644 |
| --- a/sdk/lib/js/dartium/js_dartium.dart |
| +++ b/sdk/lib/js/dartium/js_dartium.dart |
| @@ -480,6 +480,22 @@ JsObject get context { |
| } |
| /** |
| + * Get the dart wrapper object for object. Top-level so we |
| + * we can access it from other libraries without it being |
| + * a public instance field on JsObject. |
| + */ |
| +dartWrapperFor(JsObject object) => object._dartWrapper; |
|
Jacob
2015/10/01 21:33:47
Nit:
dartWrapperFor --> getDartHtmlWrapper
setDart
Alan Knight
2015/10/01 22:10:09
Done.
|
| + |
| +/** |
| + * Set the dart wrapper object for object. Top-level so we |
| + * we can access it from other libraries without it being |
| + * a public instance field on JsObject. |
| + */ |
| +void setDartWrapperFor(JsObject object, wrapper) { |
| + object._dartWrapper = wrapper; |
| +} |
| + |
| +/** |
| * Proxies a JavaScript object to Dart. |
| * |
| * The properties of the JavaScript object are accessible via the `[]` and |
| @@ -492,7 +508,7 @@ class JsObject extends NativeFieldWrapperClass2 { |
| * If this JsObject is wrapped, e.g. DOM objects, then we can save the |
| * wrapper here and preserve its identity. |
| */ |
| - var dartWrapper; |
| + var _dartWrapper; |
| /** |
| * Constructs a new JavaScript object from [constructor] and returns a proxy |