TextEncoder: TextEncoder() constructor

Note: This feature is available in Web Workers.

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

Browser compatibility

See also