Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1669)

Unified Diff: sdk/lib/html/dart2js/html_dart2js.dart

Issue 180583002: Fix for FileReader.readAsArrayBuffer http://dartbug.com/17058 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
Download patch
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tests/html/filereader_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 535a296193176c15ddb06d31b6f739cf2ccc410e..15967d9542aafdadef752de74c18407fda2f3671 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -12729,7 +12729,7 @@ class FileList extends Interceptor with ListMixin<File>, ImmutableListMixin<File
@DocsEditable()
File item(int index) native;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// 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.
@@ -12737,6 +12737,17 @@ class FileList extends Interceptor with ListMixin<File>, ImmutableListMixin<File
@DocsEditable()
@DomName('FileReader')
class FileReader extends EventTarget native "FileReader" {
+
+ @DomName('FileReader.result')
+ @DocsEditable()
+ Object get result {
+ var res = JS('Null|String|NativeByteBuffer', '#.result', this);
+ if (res is ByteBuffer) {
+ return new Uint8List.view(res);
+ }
+ return res;
+ }
+
// To suppress missing implicit constructor warnings.
factory FileReader._() { throw new UnsupportedError("Not supported"); }
@@ -12827,11 +12838,6 @@ class FileReader extends EventTarget native "FileReader" {
@DocsEditable()
final int readyState;
- @DomName('FileReader.result')
- @DocsEditable()
- @Creates('String|NativeByteBuffer|Null')
- final Object result;
-
@DomName('FileReader.abort')
@DocsEditable()
void abort() native;
@@ -12878,6 +12884,7 @@ class FileReader extends EventTarget native "FileReader" {
@DomName('FileReader.onprogress')
@DocsEditable()
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | tests/html/filereader_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698