Firefox Tomorrow

web api instance property

TextDecoder: encoding property

View on MDN ↗

Available in workers

The TextDecoder.encoding read-only property returns a string containing the name of the character encoding that this decoder will use.

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

Value

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

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also