TextDecoderStream: fatal プロパティ
fatal
は TextDecoderStream
インターフェイスの読み取り専用プロパティで、TextDecoderStream
オブジェクトのエラーモードが fatal
に設定されているかどうかを論理値で示します。
このプロパティが true
であった場合、デコーダーがデコード中に正しくない形のデータに遭遇した場合、TypeError
が発生します。
false
であった場合、デコーダーは無効なデータを置換文字 U+FFFD
(�) で置き換えます。
このプロパティの値は TextDecoderStream()
コンストラクターで設定されます。
値
論理値で、エラーモードが "fatal" に設定されている場合は true
となります。
そうでない場合は false
となり、エラーモードが "replacement" であることを示します。
例
js
stream = new TextDecoderStream();
console.log(stream.fatal); // false を返す
仕様書
Specification |
---|
Encoding # 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.