2025-02-07 12:40:26 +00:00
|
|
|
#import <Encoding/TextEncoderCommon.idl>
|
2023-10-06 07:03:44 +02:00
|
|
|
|
|
|
|
// https://encoding.spec.whatwg.org/#dictdef-textencoderencodeintoresult
|
|
|
|
dictionary TextEncoderEncodeIntoResult {
|
2025-01-14 00:08:27 +13:00
|
|
|
[GenerateAsRequired] unsigned long long read;
|
|
|
|
[GenerateAsRequired] unsigned long long written;
|
2023-10-06 07:03:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
// https://encoding.spec.whatwg.org/#textencoder
|
|
|
|
[Exposed=*]
|
2021-12-12 18:03:22 +00:00
|
|
|
interface TextEncoder {
|
|
|
|
constructor();
|
|
|
|
|
2021-12-12 18:05:11 +00:00
|
|
|
[NewObject] Uint8Array encode(optional USVString input = "");
|
2023-10-06 07:03:44 +02:00
|
|
|
TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
|
2021-12-12 18:03:22 +00:00
|
|
|
};
|
2025-02-07 12:40:26 +00:00
|
|
|
|
2023-10-06 07:03:44 +02:00
|
|
|
TextEncoder includes TextEncoderCommon;
|