Update webidl files for TextEncoder and TextDecoder (#37952)

This PR updates the webidl files for `TextEncoder` and `TextDecoder`.
For `TextDecoder.webidl`, the type `AllowSharedBufferSource`, as defined
in the latest spec, is replaced with `BufferSource` as servo currently
does not support `ShareArrayBuffer`

Testing: This update does not introduce any change to the generated rust
binding, so the existing testing would suffice

---------

Signed-off-by: Minghua Wu <michael.wu1107@gmail.com>
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
Co-authored-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
This commit is contained in:
minghuaw 2025-07-09 20:42:36 +08:00 committed by GitHub
parent 4cddd5fd5e
commit 562d9e4a21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 26 additions and 6 deletions

View file

@ -12,12 +12,11 @@ dictionary TextDecodeOptions {
boolean stream = false;
};
[Exposed=(Window,Worker)]
[Exposed=*]
interface TextDecoder {
[Throws] constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
readonly attribute DOMString encoding;
readonly attribute boolean fatal;
readonly attribute boolean ignoreBOM;
[Throws]
USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
};
TextDecoder includes TextDecoderCommon;