Re: [w3c/FileAPI] Add simpler reading methods to Blob interface. (#117)

mkruisselbrink commented on this pull request.



> +    1. If a [=file read error=] occured while reading |bytes|, [$ReadableStream/error$]
+       |stream| with a [=failure reason=] and abort these steps.
+    1. [=ReadableStream/Enqueue=] |bytes| into |stream|.
+
+    Issue: We need to specify more concretely what reading from a Blob actually does, and what
+    possible errors can happen.
+
+<h4 id="text-method-algo">
+The text method</h4>
+
+The <dfn method for=Blob>text()</dfn> method returns the contents
+of the blob as a {{USVString}}.
+
+It must act as follows:
+
+1. Let |stream| be the the result of [=getting a stream for a Blob=] for the [=context object=].

https://github.com/w3c/FileAPI/pull/118 is my attempt at rewriting FileReader in similar terms as this pull request does. Let me know if you want me to finish landing that before getting back to this PR?

Just sticking to UTF-8 seems fine to me. At least it would be consistent with fetch.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/FileAPI/pull/117#discussion_r264913199

Received on Tuesday, 12 March 2019 22:42:33 UTC