TextDecoder.idl 865 B

123456789101112131415161718192021222324252627
  1. // https://encoding.spec.whatwg.org/#textdecodercommon
  2. interface mixin TextDecoderCommon {
  3. readonly attribute DOMString encoding;
  4. readonly attribute boolean fatal;
  5. readonly attribute boolean ignoreBOM;
  6. };
  7. // https://encoding.spec.whatwg.org/#textdecoderoptions
  8. dictionary TextDecoderOptions {
  9. boolean fatal = false;
  10. boolean ignoreBOM = false;
  11. };
  12. // https://encoding.spec.whatwg.org/#textdecodeoptions
  13. dictionary TextDecodeOptions {
  14. boolean stream = false;
  15. };
  16. // https://encoding.spec.whatwg.org/#textdecoder
  17. [Exposed=*]
  18. interface TextDecoder {
  19. constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
  20. // FIXME: BufferSource is really a AllowSharedBufferSource
  21. USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
  22. };
  23. TextDecoder includes TextDecoderCommon;