2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-09-28 14:19:18 +04:00
|
|
|
/* 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 http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
2012-10-25 06:03:21 +04:00
|
|
|
* http://encoding.spec.whatwg.org/#interface-textdecoder
|
2012-09-28 14:19:18 +04:00
|
|
|
*/
|
|
|
|
|
2022-08-12 18:59:05 +03:00
|
|
|
interface mixin TextDecoderCommon {
|
2022-08-12 06:36:41 +03:00
|
|
|
[Constant]
|
|
|
|
readonly attribute DOMString encoding;
|
|
|
|
[Constant]
|
|
|
|
readonly attribute boolean fatal;
|
|
|
|
[Constant]
|
|
|
|
readonly attribute boolean ignoreBOM;
|
2022-08-12 18:59:05 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
[Exposed=(Window,Worker)]
|
|
|
|
interface TextDecoder {
|
|
|
|
[Throws]
|
|
|
|
constructor(optional DOMString label = "utf-8",
|
|
|
|
optional TextDecoderOptions options = {});
|
|
|
|
|
2012-09-28 14:19:18 +04:00
|
|
|
[Throws]
|
2019-07-03 10:52:35 +03:00
|
|
|
USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
|
2012-09-28 14:19:18 +04:00
|
|
|
};
|
2022-08-12 18:59:05 +03:00
|
|
|
TextDecoder includes TextDecoderCommon;
|
2012-09-28 14:19:18 +04:00
|
|
|
|
|
|
|
dictionary TextDecoderOptions {
|
|
|
|
boolean fatal = false;
|
2018-08-08 21:30:01 +03:00
|
|
|
boolean ignoreBOM = false;
|
2012-09-28 14:19:18 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary TextDecodeOptions {
|
|
|
|
boolean stream = false;
|
|
|
|
};
|