Skip to content

TextEncoder

Generated from idl/encoding.webidl when the site was built at 7aa23e2.

TextEncoder is an interface in idl/encoding.webidl, exposed in Window, Worker. It includes TextEncoderCommon. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
Text encoding and decoding Widely available Partial 2.0% 23593 of 1151764 subtests pass 4
constructor
constructor();
int32_t niso_text_encoder_new(niso_dom* dom, niso_handle* out);
operation
[NewObject] Uint8Array encode(optional USVString input = "");
int32_t niso_text_encoder_encode(niso_dom* dom, niso_handle self, const char* input, size_t input_len, niso_bytes* out);
attribute from TextEncoderCommon
readonly attribute DOMString encoding;
int32_t niso_text_encoder_common_get_encoding(niso_dom* dom, niso_handle self, niso_str* out);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • encodeInto (Text encoding and decoding)
  • worker_support (Text encoding and decoding)