mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:37:35 +00:00
LibWeb: Add TextEncoder encodeInto
This commit is contained in:
parent
f1ead552ce
commit
0104225d9b
9 changed files with 123 additions and 10 deletions
|
@ -1,9 +1,20 @@
|
|||
[Exposed=(Window,Worker)]
|
||||
// https://encoding.spec.whatwg.org/#textencodercommon
|
||||
interface mixin TextEncoderCommon {
|
||||
readonly attribute DOMString encoding;
|
||||
};
|
||||
|
||||
// https://encoding.spec.whatwg.org/#dictdef-textencoderencodeintoresult
|
||||
dictionary TextEncoderEncodeIntoResult {
|
||||
unsigned long long read;
|
||||
unsigned long long written;
|
||||
};
|
||||
|
||||
// https://encoding.spec.whatwg.org/#textencoder
|
||||
[Exposed=*]
|
||||
interface TextEncoder {
|
||||
constructor();
|
||||
|
||||
[NewObject] Uint8Array encode(optional USVString input = "");
|
||||
// TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
|
||||
|
||||
readonly attribute DOMString encoding;
|
||||
TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
|
||||
};
|
||||
TextEncoder includes TextEncoderCommon;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue