1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

LibWeb: Implement a very basic version of TextDecoder

We had a very basic implementation of TextEncoder, let's add a
TextDecoder next to that :^)
This commit is contained in:
Ali Mohammad Pur 2022-02-15 14:16:21 +03:30 committed by Ali Mohammad Pur
parent 57997ed336
commit 16c0646b9d
6 changed files with 109 additions and 0 deletions

View file

@ -0,0 +1,13 @@
[Exposed=(Window,Worker)]
interface TextDecoder {
// FIXME: 'optional TextDecoderOptions options = {}'
constructor(optional DOMString label = "utf-8");
// FIXME: [AllowShared] on the first parameter.
// FIXME: 'optional TextDecodeOptions options = {}'
USVString decode(optional BufferSource input);
readonly attribute DOMString encoding;
readonly attribute boolean fatal;
readonly attribute boolean ignoreBOM;
};