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 inWeb Workers.
Thefatal read-only property of theTextDecoder interface is aBoolean indicating whether the error mode is fatal.
If the property istrue, then a decoder will throw aTypeError if it encounters malformed data while decoding.Iffalse, the decoder will substitute the invalid data with the replacement characterU+FFFD (�).The value of the property is set in thefatal argument to the decoder's constructor.
In this article
Value
A boolean which will betrue if the error mode is set tofatal.Otherwise, it will befalse, indicating that the error mode isreplacement.
Specifications
| Specification |
|---|
| Encoding> # ref-for-dom-textdecoder-fatal①> |