2012-12-26 02:00:15 +04: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
|
|
|
*
|
2012-10-25 06:03:21 +04:00
|
|
|
* Any copyright is dedicated to the Public Domain.
|
|
|
|
* http://creativecommons.org/publicdomain/zero/1.0/
|
2012-09-28 14:19:18 +04:00
|
|
|
*/
|
|
|
|
|
2014-08-05 06:20:34 +04:00
|
|
|
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options),
|
2014-11-06 18:54:38 +03:00
|
|
|
Exposed=(Window,Worker,System)]
|
2012-09-28 14:19:18 +04:00
|
|
|
interface TextDecoder {
|
2012-12-26 02:00:15 +04:00
|
|
|
[Constant]
|
2012-09-28 14:19:18 +04:00
|
|
|
readonly attribute DOMString encoding;
|
2014-11-21 22:58:51 +03:00
|
|
|
[Constant]
|
|
|
|
readonly attribute boolean fatal;
|
2018-08-08 21:30:01 +03:00
|
|
|
[Constant]
|
|
|
|
readonly attribute boolean ignoreBOM;
|
2012-09-28 14:19:18 +04:00
|
|
|
[Throws]
|
2014-11-21 23:46:19 +03:00
|
|
|
USVString decode(optional BufferSource input, optional TextDecodeOptions options);
|
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;
|
|
|
|
};
|
|
|
|
|