mirror of
https://github.com/servo/servo.git
synced 2025-07-17 12:23:40 +01:00
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>
22 lines
700 B
Text
22 lines
700 B
Text
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
// https://encoding.spec.whatwg.org/#interface-textdecoder
|
|
dictionary TextDecoderOptions {
|
|
boolean fatal = false;
|
|
boolean ignoreBOM = false;
|
|
};
|
|
|
|
dictionary TextDecodeOptions {
|
|
boolean stream = false;
|
|
};
|
|
|
|
[Exposed=*]
|
|
interface TextDecoder {
|
|
[Throws] constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
|
|
|
|
[Throws]
|
|
USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
|
|
};
|
|
TextDecoder includes TextDecoderCommon;
|