此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

TextDecoderStream.ignoreBOM

基线 广泛可用

自 2022年9月 起,此特性已在主流浏览器中得到支持,可在大多数设备和浏览器版本中正常使用。

TextDecoderStream 接口的只读属性 ignoreBOM 返回一个 boolean,表示是否忽略字节顺序标记(BOM)。

一个 boolean,初始值是 false

示例

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

规范

规范
Encoding
# textdecoder-ignore-bom-flag

浏览器兼容性