mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #13729 - cynicaldevil:readAsArrayBuffer, r=Ms2ger
Implemented FileReader::readAsArrayBuffer <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #12555 <!-- Either: --> - [X] There are tests for these changes There's still some small issues, but I suppose most of the work is done: - test-tidy mentions a `method declared in webidl is missing a comment with a specification link` for the `getResult` method. - I get an 'unused code' warning for code present in `UnionTypes.rs`, which is auto-generated. Passing tests: - [x] `FileAPI/reading-data-section/filereader_result.html` - [x] `FileAPI/reading-data-section/filereader_readAsArrayBuffer.html` - [x] `FileAPI/idlharness.html` - [ ] `FileAPI/reading-data-section/FileReader-multiple-reads.html` <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13729) <!-- Reviewable:end -->
This commit is contained in:
commit
ceb18e7d86
7 changed files with 73 additions and 55 deletions
|
@ -4,13 +4,13 @@
|
|||
|
||||
// http://dev.w3.org/2006/webapi/FileAPI/#APIASynch
|
||||
|
||||
//typedef (DOMString or ArrayBuffer) FileReaderResult;
|
||||
typedef (DOMString or object) FileReaderResult;
|
||||
[Constructor, Exposed=(Window,Worker)]
|
||||
interface FileReader: EventTarget {
|
||||
|
||||
// async read methods
|
||||
//[Throws]
|
||||
//void readAsArrayBuffer(Blob blob);
|
||||
[Throws]
|
||||
void readAsArrayBuffer(Blob blob);
|
||||
[Throws]
|
||||
void readAsText(Blob blob, optional DOMString label);
|
||||
[Throws]
|
||||
|
@ -25,8 +25,7 @@ interface FileReader: EventTarget {
|
|||
readonly attribute unsigned short readyState;
|
||||
|
||||
// File or Blob data
|
||||
//readonly attribute FileReaderResult? result;
|
||||
readonly attribute DOMString? result;
|
||||
readonly attribute FileReaderResult? result;
|
||||
|
||||
readonly attribute DOMException? error;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue