Skip to content

Latest commit

 

History

History
79 lines (67 loc) · 3.85 KB

File metadata and controls

79 lines (67 loc) · 3.85 KB
title short-title slug page-type browser-compat
TextDecoder: encoding property
encoding
Web/API/TextDecoder/encoding
web-api-instance-property
api.TextDecoder.encoding

{{APIRef("Encoding API")}}

The TextDecoder.encoding read-only property returns a string containing the name of the decoding algorithm used by the specific decoder object.

The encoding is set by the constructor label parameter, and defaults to utf-8.

Value

A lower-cased ASCII string, which can be one of the following values:

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • The {{DOMxRef("TextDecoder")}} interface it belongs to.