TextEncoder: TextEncoder() constructor
The TextEncoder()
constructor returns a newly created TextEncoder
object that will generate a byte stream with UTF-8 encoding.
Syntax
js
new TextEncoder()
Parameters
None.
Specifications
Specification |
---|
Encoding Standard # ref-for-dom-textencoder① |
Browser compatibility
desktop | mobile | server | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
TextEncoder() constructor |
See also
- The
TextEncoder
interface it belongs to.