Closed Bug 1336766 Opened 7 years ago Closed 7 years ago

FileReader onerror dispatches a ProgressEvent - FileReader::FreeDataAndDispatchError ignores mError

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID
Tracking Status
firefox54 --- affected

People

(Reporter: mstange, Unassigned)

Details

I'm not sure if this is intentional. It seems rather strange to me.
Code example:

const reader = new FileReader();
reader.onerror = errorEvent => {
  // errorEvent is not helpful at all.
  // Need to check reader.error.name instead.
};
reader.readAsArrayBuffer(someBlob);
https://w3c.github.io/FileAPI/#dfn-error-event

This is correct. You should use FileReader.error in order to have a DOMError object.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
ok, thanks
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.