Index: client/html/src/Int8ArrayWrappingImplementation.dart |
diff --git a/client/html/generated/src/wrapping/_Int8ArrayWrappingImplementation.dart b/client/html/src/Int8ArrayWrappingImplementation.dart |
similarity index 54% |
rename from client/html/generated/src/wrapping/_Int8ArrayWrappingImplementation.dart |
rename to client/html/src/Int8ArrayWrappingImplementation.dart |
index 592e29e6a3add2e8757c81660ebe13799116120f..13dc873803b9ba56c9035f1f7d5a65a2307b4e91 100644 |
--- a/client/html/generated/src/wrapping/_Int8ArrayWrappingImplementation.dart |
+++ b/client/html/src/Int8ArrayWrappingImplementation.dart |
@@ -2,11 +2,21 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-// WARNING: Do not edit - generated code. |
- |
class Int8ArrayWrappingImplementation extends ArrayBufferViewWrappingImplementation implements Int8Array { |
Int8ArrayWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} |
+ factory Int8ArrayWrappingImplementation(int length) => |
+ LevelDom.wrapInt8Array(new dom.Int8Array(length)); |
+ |
+ factory Int8ArrayWrappingImplementation.from(List<num> list) => |
+ // TODO(nweiz): when there's a cross-platform name for the native |
+ // implementation of List, check if [list] is native and if not convert it |
+ // to a native list before sending it to the JS constructor. |
+ LevelDom.wrapInt8Array(new dom.Int8Array.fromList(list)); |
+ |
+ factory Int8ArrayWrappingImplementation.fromBuffer(ArrayBuffer buffer) => |
+ LevelDom.wrapInt8Array(new dom.Int8Array.fromBuffer(LevelDom.unwrap(buffer))); |
+ |
int get length() { return _ptr.length; } |
Int8Array subarray(int start, [int end]) { |