2012-12-25 22:00:15 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-09-28 10:19:18 +00: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 02:03:21 +00:00
|
|
|
* http://encoding.spec.whatwg.org/#interface-textdecoder
|
2012-09-28 10:19:18 +00:00
|
|
|
*
|
2012-10-25 02:03:21 +00:00
|
|
|
* Any copyright is dedicated to the Public Domain.
|
|
|
|
* http://creativecommons.org/publicdomain/zero/1.0/
|
2012-09-28 10:19:18 +00:00
|
|
|
*/
|
|
|
|
|
2012-10-25 02:03:21 +00:00
|
|
|
[Constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options)]
|
2012-09-28 10:19:18 +00:00
|
|
|
interface TextDecoder {
|
2012-12-25 22:00:15 +00:00
|
|
|
[Constant]
|
2012-09-28 10:19:18 +00:00
|
|
|
readonly attribute DOMString encoding;
|
|
|
|
[Throws]
|
2012-12-29 00:55:32 +00:00
|
|
|
DOMString decode();
|
|
|
|
[Throws]
|
|
|
|
DOMString decode(ArrayBufferView input, optional TextDecodeOptions options);
|
2012-09-28 10:19:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary TextDecoderOptions {
|
|
|
|
boolean fatal = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
dictionary TextDecodeOptions {
|
|
|
|
boolean stream = false;
|
|
|
|
};
|
|
|
|
|