- From: Aymeric Vitte <vitteaymeric@gmail.com>
- Date: Wed, 21 Aug 2013 01:13:07 +0200
- To: "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>
- Message-ID: <5213F803.1020007@gmail.com>
The specs says : " It can also return /partial Blob data/. Partial Blob data is the part of the |File| <http://www.w3.org/TR/FileAPI/#dfn-file> or |Blob| <http://www.w3.org/TR/FileAPI/#dfn-Blob> that has been read into memory /currently/; when processing the read method <http://www.w3.org/TR/FileAPI/#read-methods> |readAsText| <http://www.w3.org/TR/FileAPI/#dfn-readAsText>, partial Blob data is a |DOMString| that is incremented as more bytes are |loaded| (a portion of the |total|) [ProgressEvents <http://www.w3.org/TR/FileAPI/#ProgressEvents>], and when processing |readAsArrayBuffer| <http://www.w3.org/TR/FileAPI/#dfn-readAsArrayBuffer> partial Blob data is an |ArrayBuffer| [TypedArrays <http://www.w3.org/TR/FileAPI/#TypedArrays>] object consisting of the bytes |loaded| so far (a portion of the |total|)[ProgressEvents <http://www.w3.org/TR/FileAPI/#ProgressEvents>]. The list below is normative for the |result| attribute and is the conformance criteria for this attribute" What is the rationale for that? The result attribute should better contain for progress events the latest data read and not the data read from the begining that you could easily reconstitute while the contrary requires more work. Use case: calculate the hash of a file while you are reading it. Regards Aymeric PS: I did not test it in all browsers, but unless I am using it wrongly, the result attribute is always null for progress events. -- jCore Email : avitte@jcore.fr iAnonym : http://www.ianonym.com node-Tor : https://www.github.com/Ayms/node-Tor GitHub : https://www.github.com/Ayms Web : www.jcore.fr Extract Widget Mobile : www.extractwidget.com BlimpMe! : www.blimpme.com
Received on Tuesday, 20 August 2013 23:13:39 UTC