TextDecoder's Decode now receives a BufferSource as input

This commit is contained in:
Christian Poveda 2018-03-24 08:58:23 -05:00
parent e8fdc677f4
commit 2c47e7e1db
3 changed files with 32 additions and 46 deletions

View file

@ -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);
};