TextDecoder: fatal property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Note: This feature is available in Web Workers.

The fatal read-only property of the TextDecoder interface is a Boolean indicating whether the error mode is fatal.

If the property is true, then a decoder will throw a TypeError if it encounters malformed data while decoding. If false, the decoder will substitute the invalid data with the replacement character U+FFFD (�). The value of the property is set in the TextDecoder() constructor.

Value

A boolean which will be true if the error mode is set to fatal. Otherwise, it will be false, indicating that the error mode is replacement.

Specifications

Specification
Encoding
# ref-for-dom-textdecoder-fatal①

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
fatal

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support