MDN self-hosted library · e01.org

TextDecoderStream

Encoding API

no runnable cells web-api-interface upstream source

Encoding API

The TextDecoderStream interface of the converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings. It is the streaming equivalent of TextDecoder. It implements the same shape as a TransformStream, allowing it to be used in ReadableStream.pipeThrough() and similar methods.

Constructor

  • TextDecoderStream()
  • : Creates a new TextDecoderStream object.

Instance properties

  • TextDecoderStream.encoding
  • : An encoding.
  • TextDecoderStream.fatal
  • : A Boolean indicating if the error mode is fatal.
  • TextDecoderStream.ignoreBOM
  • : A Boolean indicating whether the byte order mark is ignored.
  • TextDecoderStream.readable
  • : Returns the ReadableStream instance controlled by this object.
  • TextDecoderStream.writable
  • : Returns the WritableStream instance controlled by this object.

Examples

Examples of streaming structured data and HTML

Specifications

Browser compatibility

See also