diff --git a/encoding.bs b/encoding.bs index 7d9ac83..4b74399 100644 --- a/encoding.bs +++ b/encoding.bs @@ -981,13 +981,13 @@ Non-browser user agents are not required to support this API.

The following example uses the {{TextEncoder}} object to encode an array of strings into an - ArrayBuffer. The result is a - Uint8Array containing the number - of strings (as a Uint32Array), + {{ArrayBuffer}}. The result is a + {{Uint8Array}} containing the number + of strings (as a {{Uint32Array}}), followed by the length of the first string (as a - Uint32Array), the + {{Uint32Array}}), the UTF-8 encoded string data, the length of the second string (as - a Uint32Array), the string data, + a {{Uint32Array}}), the string data, and so on.

function encodeArrayOfStrings(strings) {
   var encoder, encoded, len, bytes, view, offset;
@@ -1018,7 +1018,7 @@ Non-browser user agents are not required to support this API.
   return bytes.buffer;
 }
-

The following example decodes an ArrayBuffer containing data encoded in the +

The following example decodes an {{ArrayBuffer}} containing data encoded in the format produced by the previous example, or an equivalent algorithm for encodings other than UTF-8, back into an array of strings. @@ -1117,7 +1117,7 @@ control.

If label is either not a label or is a label for replacement, throws a - RangeError. + {{RangeError}}.

decoder . encoding

Returns encoding's name, lowercased. @@ -1144,7 +1144,7 @@ string += decoder.decode(); // end-of-stream

If the error mode is "fatal" and encoding's decoder returns error, throws a - TypeError. + {{TypeError}}.

The @@ -1157,7 +1157,7 @@ constructor, when invoked, must run these steps: label.

  • If encoding is failure or replacement, - throw a RangeError. + throw a {{RangeError}}.

  • Let dec be a new {{TextDecoder}} object. @@ -1227,7 +1227,7 @@ method, when invoked, must run these steps: serialized.

  • Otherwise, if result is error, - throw a TypeError. + throw a {{TypeError}}.

  • Otherwise, do nothing. @@ -1299,8 +1299,8 @@ method, when invoked, must run these steps:

  • If result is finished, convert output into a - byte sequence, and then return a Uint8Array object wrapping an - ArrayBuffer containing output. + byte sequence, and then return a {{Uint8Array}} object wrapping an + {{ArrayBuffer}} containing output.

    These encodings cannot return diff --git a/encoding.html b/encoding.html index 9401af0..d4ed696 100644 --- a/encoding.html +++ b/encoding.html @@ -7,7 +7,7 @@ - +