TextEncoder.encoding

这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。

TextEncoder.encoding 只读属性返回一个DOMString ,其中包含特定编码器使用的编码算法的名称。

现在只会返回“utf-8”。

语法

b = encoder.encoding;

标准

Specification Status Comment
Encoding
TextEncoder.encoding
Living Standard Initial definition.

浏览器支持

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic support
Experimental
Chrome Full support 38Edge ? Firefox Full support 19
Full support 19
Full support 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
IE No support NoOpera Full support 25Safari No support NoWebView Android Full support 38Chrome Android Full support 38Edge Mobile ? Firefox Android Full support 19
Full support 19
Full support 18
Notes
Notes Firefox 18 implemented an earlier and slightly different version of the specification.
Opera Android ? Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.

另见

文档标签和贡献者

此页面的贡献者: fscholz, Taoja
最后编辑者: fscholz,