mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #20413 - christianpoveda:issue_20344, r=jdm
TextDecoder's Decode now receives a BufferSource as input <!-- Please describe your changes on the following line: --> r? jdm --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #20344 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20413) <!-- Reviewable:end -->
This commit is contained in:
commit
2f94e0d2a8
3 changed files with 32 additions and 46 deletions
|
@ -5,15 +5,18 @@
|
|||
// https://encoding.spec.whatwg.org/#interface-textdecoder
|
||||
dictionary TextDecoderOptions {
|
||||
boolean fatal = false;
|
||||
//boolean ignoreBOM = false;
|
||||
// boolean ignoreBOM = false;
|
||||
};
|
||||
|
||||
dictionary TextDecodeOptions {
|
||||
// boolean stream = false;
|
||||
};
|
||||
|
||||
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options), Exposed=(Window,Worker)]
|
||||
interface TextDecoder {
|
||||
readonly attribute DOMString encoding;
|
||||
readonly attribute boolean fatal;
|
||||
//readonly attribute boolean ignoreBOM;
|
||||
//USVString decode(optional BufferSource input, optional TextDecodeOptions options);
|
||||
// readonly attribute boolean ignoreBOM;
|
||||
[Throws]
|
||||
USVString decode(optional object input);
|
||||
USVString decode(optional BufferSource input, optional TextDecodeOptions options);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue