| Index: tools/dom/templates/html/dartium/html_dartium.darttemplate
|
| diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
|
| index cb5e7dd2037f7cc3338f5fb6a261635e2a1e43df..e33b195264cdafaffb5da53c235395c0ec38ad21 100644
|
| --- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
|
| +++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
|
| @@ -404,6 +404,12 @@ wrap_jso(jsObject) {
|
| return wrapper;
|
| }
|
|
|
| + if (jsObject is js.JsArray) {
|
| + var wrappingList = new _DartHtmlWrappingList(jsObject);
|
| + js.setDartHtmlWrapperFor(jsObject, wrappingList);
|
| + return wrappingList;
|
| + }
|
| +
|
| // Try the most general type conversions on it.
|
| // TODO(alanknight): We may be able to do better. This maintains identity,
|
| // which is useful, but expensive. And if we nest something that only
|
| @@ -549,6 +555,22 @@ convertDartToNative_List(List input) => new js.JsArray()..addAll(input);
|
| // Conversion function place holder (currently not used in dart2js or dartium).
|
| List convertDartToNative_StringArray(List<String> input) => input;
|
|
|
| +/**
|
| + * Wraps a JsArray and will call wrap_jso on its entries.
|
| + */
|
| +class _DartHtmlWrappingList extends ListBase {
|
| + _DartHtmlWrappingList(this._basicList);
|
| +
|
| + final js.JsArray _basicList;
|
| +
|
| + operator [](int index) => wrap_jso(_basicList[index]);
|
| +
|
| + operator []=(int index, value) => _basicList[index] = unwrap_jso(value);
|
| +
|
| + int get length => _basicList.length;
|
| + int set length(int newLength) => _basicList.length = newLength;
|
| +}
|
| +
|
| $else
|
| class JsoNativeFieldWrapper extends NativeFieldWrapperClass2 {}
|
|
|
|
|