TextDecoder: fatal プロパティ
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.
fatal
は TextDecoder
インターフェイスの読み取り専用プロパティで、エラーモードが fatal であるかどうかを論理値で示します。
このプロパティが true
であった場合、デコーダーがデコード中に正しくない形のデータに遭遇した場合、TypeError
が発生します。
false
であった場合、デコーダーは無効なデータを置換文字 U+FFFD
(�) で置き換えます。
このプロパティの値は TextDecoder()
コンストラクターで設定されます。
値
論理値で、エラーモードが fatal
に設定されている場合は true
となります。
そうでない場合は false
となり、エラーモードが replacement
であることを示します。
仕様書
Specification |
---|
Encoding # ref-for-dom-textdecoder-fatal① |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fatal |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.