MDN self-hosted library · e01.org

TextDecoderStream: encoding property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
stream = new TextDecoderStream();
console.log(stream.encoding); // returns the default "utf-8"