Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the encoding IDL file (#9780)
Also update the existing idlharness.js test to use it.
- Loading branch information
1 parent
8896c5c
commit b202bbb
Showing
2 changed files
with
34 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
dictionary TextDecoderOptions { | ||
boolean fatal = 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); | ||
}; | ||
|
||
[Constructor, | ||
Exposed=(Window,Worker)] | ||
interface TextEncoder { | ||
readonly attribute DOMString encoding; | ||
[NewObject] Uint8Array encode(optional USVString input = ""); | ||
}; |