1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-23 15:49:44 -05:00

fix(ext/web): FileReader error messages (#12218)

This commit is contained in:
Dan Rose 2021-09-25 08:28:17 -05:00 committed by GitHub
parent 1380defb80
commit 09f2cdbc72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -367,7 +367,7 @@
/** @param {Blob} blob */
readAsDataURL(blob) {
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 });
// alias for readAsArrayBuffer
this.#readOperation(blob, { kind: "DataUrl" });
@ -379,7 +379,7 @@
*/
readAsText(blob, encoding = undefined) {
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 });
if (encoding !== undefined) {
encoding = webidl.converters["DOMString"](encoding, {