1// GENERATED CONTENT - DO NOT EDIT 2// Content was automatically extracted by Reffy into webref 3// (https://github.com/w3c/webref) 4// Source: Encoding Standard (https://encoding.spec.whatwg.org/) 5 6interface mixin TextDecoderCommon { 7 readonly attribute DOMString encoding; 8 readonly attribute boolean fatal; 9 readonly attribute boolean ignoreBOM; 10}; 11 12dictionary TextDecoderOptions { 13 boolean fatal = false; 14 boolean ignoreBOM = false; 15}; 16 17dictionary TextDecodeOptions { 18 boolean stream = false; 19}; 20 21[Exposed=(Window,Worker)] 22interface TextDecoder { 23 constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {}); 24 25 USVString decode(optional [AllowShared] BufferSource input, optional TextDecodeOptions options = {}); 26}; 27TextDecoder includes TextDecoderCommon; 28 29interface mixin TextEncoderCommon { 30 readonly attribute DOMString encoding; 31}; 32 33dictionary TextEncoderEncodeIntoResult { 34 unsigned long long read; 35 unsigned long long written; 36}; 37 38[Exposed=(Window,Worker)] 39interface TextEncoder { 40 constructor(); 41 42 [NewObject] Uint8Array encode(optional USVString input = ""); 43 TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination); 44}; 45TextEncoder includes TextEncoderCommon; 46 47[Exposed=(Window,Worker)] 48interface TextDecoderStream { 49 constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {}); 50}; 51TextDecoderStream includes TextDecoderCommon; 52TextDecoderStream includes GenericTransformStream; 53 54[Exposed=(Window,Worker)] 55interface TextEncoderStream { 56 constructor(); 57}; 58TextEncoderStream includes TextEncoderCommon; 59TextEncoderStream includes GenericTransformStream; 60