idb.filesystem.js
idb.filesystem.js copied to clipboard
File writer callbacks do not match spec.
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.
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
...