TextDecoderStream.fatal

TextDecoderStream 接口的只读属性 fatal 是一个 boolean,表示 TextDecoderStream 对象的错误模式是否设置为 fatal

两个可能的错误模式为 fatal 或者 replacement,默认是 replacement,它将一个替换字符 U+FFFD(�)推送到输出。

一个 boolean。如果错误模式设置为 fatal,返回 true。否则它返回 false

示例

js
stream = new TextDecoderStream();
console.log(stream.fatal); // returns false

规范

Specification
Encoding
# dom-textdecoder-fatal

浏览器兼容性

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