This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for the proper prefixes to use in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the spec changes.
The TextEncoder.encoding
read-only property returns a DOMString
containing the name of the encoding algorithm used by the specific encoder.
It can only have the following value 'utf-8'
.
Syntax
b = encoder.encoding;
Specifications
Specification | Status | Comment |
---|---|---|
Encoding The definition of 'TextEncoder.encoding' in that specification. |
Living Standard | Initial definition. |
Browser compatibility
[1] An earlier, and slightly different, version of the specification was implemented in Firefox 18.
See also
- The
TextEncoder
interface it belongs to.