| Index: lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate
|
| diff --git a/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate b/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate
|
| index c120b45a7a4d1eb7d04224b85be0bbc9eb4e31a4..d903761ddbb43f81e6f5cc094a5d9efc1e5813a2 100644
|
| --- a/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate
|
| +++ b/lib/html/templates/html/dart2js/factoryprovider_DataView.darttemplate
|
| @@ -3,11 +3,14 @@
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| class $FACTORYPROVIDER {
|
| - static DataView createDataView(ArrayBuffer buffer,
|
| - [int byteOffset = null, int byteLength = null])
|
| - native '''
|
| - if (byteOffset == null) return new DataView(buffer);
|
| - if (byteLength == null) return new DataView(buffer, byteOffset);
|
| - return new DataView(buffer, byteOffset, byteLength);
|
| - ''';
|
| + static DataView createDataView(
|
| + ArrayBuffer buffer, [int byteOffset = null, int byteLength = null]) {
|
| + if (byteOffset == null) {
|
| + return JS('DataView', 'new DataView(#)', buffer);
|
| + }
|
| + if (byteLength == null) {
|
| + return JS('DataView', 'new DataView(#,#)', buffer, byteOffset);
|
| + }
|
| + return JS('DataView', 'new DataView(#,#,#)', buffer, byteOffset, byteLength);
|
| + }
|
| }
|
|
|