summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-08-24 13:13:22 +0200
committerGitHub <noreply@github.com>2021-08-24 13:13:22 +0200
commit50f69a6996ae4dcdfe53f15fc49949d3756c9787 (patch)
treec24892bcb4de1b2a137b592c6e3c46e359250f3e
parent7b882cc05f02e9b09e9ec2856e37730ae947f509 (diff)
fix: FileReader.readAsText compat (#11814)
Fixes a WPT test.
-rw-r--r--ext/web/10_filereader.js2
-rw-r--r--tools/wpt/expectation.json3
2 files changed, 2 insertions, 3 deletions
diff --git a/ext/web/10_filereader.js b/ext/web/10_filereader.js
index 13fe6af2d..3ca53df7d 100644
--- a/ext/web/10_filereader.js
+++ b/ext/web/10_filereader.js
@@ -355,7 +355,7 @@
* @param {Blob} blob
* @param {string} [encoding]
*/
- readAsText(blob, encoding) {
+ readAsText(blob, encoding = undefined) {
webidl.assertBranded(this, FileReader);
const prefix = "Failed to execute 'readAsBinaryString' on 'FileReader'";
webidl.requiredArguments(arguments.length, 1, { prefix });
diff --git a/tools/wpt/expectation.json b/tools/wpt/expectation.json
index 5d1ffa446..f8ea102c1 100644
--- a/tools/wpt/expectation.json
+++ b/tools/wpt/expectation.json
@@ -16339,7 +16339,6 @@
"FileList interface: existence and properties of interface prototype object's @@unscopables property",
"FileList interface: operation item(unsigned long)",
"FileList interface: attribute length",
- "FileReader interface: operation readAsText(Blob, optional DOMString)",
"FileReader interface: attribute onloadstart",
"FileReader interface: attribute onprogress",
"FileReader interface: attribute onload",
@@ -16852,4 +16851,4 @@
"performance.setResourceTimingBufferSize in workers"
]
}
-}
+} \ No newline at end of file