encode method
The TextEncoder.encode() method takes a string as input, and returns
a Uint8Array containing the text given in parameters encoded with the
specific method for that TextEncoder object.
Implementation
external JSUint8Array encode([String input]);