mirror of
https://github.com/denoland/deno.git
synced 2024-12-24 08:09:08 -05:00
fix(ext/web): FileReader error messages (#12218)
This commit is contained in:
parent
1380defb80
commit
09f2cdbc72
1 changed files with 2 additions and 2 deletions
|
@ -367,7 +367,7 @@
|
||||||
/** @param {Blob} blob */
|
/** @param {Blob} blob */
|
||||||
readAsDataURL(blob) {
|
readAsDataURL(blob) {
|
||||||
webidl.assertBranded(this, FileReader);
|
webidl.assertBranded(this, FileReader);
|
||||||
const prefix = "Failed to execute 'readAsBinaryString' on 'FileReader'";
|
const prefix = "Failed to execute 'readAsDataURL' on 'FileReader'";
|
||||||
webidl.requiredArguments(arguments.length, 1, { prefix });
|
webidl.requiredArguments(arguments.length, 1, { prefix });
|
||||||
// alias for readAsArrayBuffer
|
// alias for readAsArrayBuffer
|
||||||
this.#readOperation(blob, { kind: "DataUrl" });
|
this.#readOperation(blob, { kind: "DataUrl" });
|
||||||
|
@ -379,7 +379,7 @@
|
||||||
*/
|
*/
|
||||||
readAsText(blob, encoding = undefined) {
|
readAsText(blob, encoding = undefined) {
|
||||||
webidl.assertBranded(this, FileReader);
|
webidl.assertBranded(this, FileReader);
|
||||||
const prefix = "Failed to execute 'readAsBinaryString' on 'FileReader'";
|
const prefix = "Failed to execute 'readAsText' on 'FileReader'";
|
||||||
webidl.requiredArguments(arguments.length, 1, { prefix });
|
webidl.requiredArguments(arguments.length, 1, { prefix });
|
||||||
if (encoding !== undefined) {
|
if (encoding !== undefined) {
|
||||||
encoding = webidl.converters["DOMString"](encoding, {
|
encoding = webidl.converters["DOMString"](encoding, {
|
||||||
|
|
Loading…
Reference in a new issue