diff --git a/index.bs b/index.bs index 44e946e..81ed20f 100644 --- a/index.bs +++ b/index.bs @@ -953,7 +953,7 @@ interface FileReader: EventTarget { // async read methods void readAsArrayBuffer(Blob blob); void readAsBinaryString(Blob blob); - void readAsText(Blob blob, optional DOMString label); + void readAsText(Blob blob, optional DOMString encoding); void readAsDataURL(Blob blob); void abort(); @@ -1137,11 +1137,11 @@ the user agent must run the steps below. The {{FileReader/readAsText()}} method The {{FileReader/readAsText()}} method can be called with an optional parameter, -label, +encoding, which is a {{DOMString}} argument that represents the label of an encoding [[!Encoding]]; if provided, it must be used as part of the encoding determination used when processing this method call. -When the readAsText(blob, label) method is called, +When the readAsText(blob, encoding) method is called, the user agent must run the steps below. 1. If {{FileReader/readyState}} = {{FileReader/LOADING}} throw an {{InvalidStateError}} and terminate this algorithm. @@ -1264,7 +1264,7 @@ take a {{Blob}} parameter. This section defines this parameter.
-
blob +
blob
This is a {{Blob}} argument and must be a reference to a single {{File}} in a {{FileList}} or a {{Blob}} argument not obtained from the underlying OS file system. @@ -1278,8 +1278,8 @@ When reading {{Blob}} objects using the {{FileReader/readAsText()}} read meth the following encoding determination steps must be followed: 1. Let |encoding| be null. -2. If the {{FileReader/readAsText()/label}} argument is present when calling the method, - set |encoding| to the result of the getting an encoding from {{FileReader/readAsText()/label}}. +2. If the {{FileReader/readAsText()/encoding}} argument is present when calling the method, + set |encoding| to the result of the getting an encoding from {{FileReader/readAsText()/encoding}}. 3. If the getting an encoding steps above return failure, then set |encoding| to null. 4. If |encoding| is null, @@ -1423,7 +1423,7 @@ interface FileReaderSync { ArrayBuffer readAsArrayBuffer(Blob blob); DOMString readAsBinaryString(Blob blob); - DOMString readAsText(Blob blob, optional DOMString label); + DOMString readAsText(Blob blob, optional DOMString encoding); DOMString readAsDataURL(Blob blob); }; @@ -1440,7 +1440,7 @@ the {{FileReaderSync}} constructor must be available.
The {{FileReaderSync/readAsText()}} method
-When the readAsText(blob, label) method is called, +When the readAsText(blob, encoding) method is called, the following steps must be followed: 1. Initiate a read operation using the blob argument,