blob: a8cbe4431a2dc72ec0ee7c0ceb89fc9d7a71aee9 [file] [log] [blame]
Victor Porof6e096922022-06-10 13:01:05 +00001// 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=*]
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=*]
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=*]
48interface TextDecoderStream {
49 constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
50};
51TextDecoderStream includes TextDecoderCommon;
52TextDecoderStream includes GenericTransformStream;
53
54[Exposed=*]
55interface TextEncoderStream {
56 constructor();
57};
58TextEncoderStream includes TextEncoderCommon;
59TextEncoderStream includes GenericTransformStream;