Definition
Encoding Standard defines TextEncoder
[Exposed=*]
interface TextEncoder {
  constructor();
  [NewObject] Uint8Array encode(optional USVString input = "");
  TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
};
TextEncoder includes TextEncoderCommon;Consolidated IDL (across mixin and partials)
[Exposed=*]
interface TextEncoder {
  constructor();
  [NewObject] Uint8Array encode(optional USVString input = "");
  TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
  readonly attribute DOMString encoding;
};