TextDecoder.prototype.encoding

The encoding of the TextDecoder object. Always "utf-8".

Syntax

encoding

Example

let decoder = new TextDecoder()
decoder.encoding
"utf-8"