Index: client/html/src/Uint16ArrayWrappingImplementation.dart |
diff --git a/client/html/generated/src/wrapping/_Uint16ArrayWrappingImplementation.dart b/client/html/src/Uint16ArrayWrappingImplementation.dart |
similarity index 54% |
rename from client/html/generated/src/wrapping/_Uint16ArrayWrappingImplementation.dart |
rename to client/html/src/Uint16ArrayWrappingImplementation.dart |
index 9c65fad620877acac2d07b860f8926cef91572f8..ba591a7f02eb991d425a0c8739cb61c0d23a5147 100644 |
--- a/client/html/generated/src/wrapping/_Uint16ArrayWrappingImplementation.dart |
+++ b/client/html/src/Uint16ArrayWrappingImplementation.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 Uint16ArrayWrappingImplementation extends ArrayBufferViewWrappingImplementation implements Uint16Array { |
Uint16ArrayWrappingImplementation._wrap(ptr) : super._wrap(ptr) {} |
+ factory Uint16ArrayWrappingImplementation(int length) => |
+ LevelDom.wrapUint16Array(new dom.Uint16Array(length)); |
+ |
+ factory Uint16ArrayWrappingImplementation.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.wrapUint16Array(new dom.Uint16Array.fromList(list)); |
+ |
+ factory Uint16ArrayWrappingImplementation.fromBuffer(ArrayBuffer buffer) => |
+ LevelDom.wrapUint16Array(new dom.Uint16Array.fromBuffer(LevelDom.unwrap(buffer))); |
+ |
int get length() { return _ptr.length; } |
Uint16Array subarray(int start, [int end]) { |