TextEncoder: encoding property

Note: This feature is available in Web Workers.

The TextEncoder.encoding read-only property returns a string containing the name of the encoding algorithm used by the specific encoder.

It can only have the following value utf-8.

Value

A string with the value utf-8.

Specifications

Specification
Encoding Standard
# dom-textencoder-encoding

Browser compatibility

BCD tables only load in the browser

See also