idb.filesystem.js icon indicating copy to clipboard operation
idb.filesystem.js copied to clipboard

File writer callbacks do not match spec.

Open ncbray opened this issue 11 years ago • 1 comments

Currently the FileWriter calls onwriteend on success, and onerror on failure.

It should call onwrite on success, onerror on failiure, and then onwriteend in both cases.

ncbray avatar Jun 13 '13 23:06 ncbray

Hi ncbray and Eric, I tested this library with simple FileSystem Writer API sample and most of functions were just working great on both FireFox and google chrome. but i also found both onwritestart and onwriteend should return ProgressEvent which contain fileWriter as target. below is the one chrome returned when it fire onwriteend callback.

fileWriter.onwriteend = function(e) { ... }

e: ProgressEvent
    target: FileWriter
    type: "writeend"
    lengthComputable: true
    loaded: 50
    total: 50
    ...

thosaka avatar Sep 09 '13 03:09 thosaka