summaryrefslogtreecommitdiff
path: root/op_crates/web/internal.d.ts
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2021-04-08 15:05:08 +0200
committerGitHub <noreply@github.com>2021-04-08 15:05:08 +0200
commitc867c1aa476b3f00933be08cbc5f528973e37857 (patch)
tree4966a8a2e853db1c552ec39821a65bc13f927d5a /op_crates/web/internal.d.ts
parentd2e500e1cf7d27132fee92cc09238e1bc98897c6 (diff)
fix: enable FileReader wpt and align to spec (#10063)
This adds some algorithms from the whatwg mimesniff, whatwg infra, and whatwg encoding specs that FileReader needs to use internally.
Diffstat (limited to 'op_crates/web/internal.d.ts')
-rw-r--r--op_crates/web/internal.d.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/op_crates/web/internal.d.ts b/op_crates/web/internal.d.ts
index 521563810..18220b08e 100644
--- a/op_crates/web/internal.d.ts
+++ b/op_crates/web/internal.d.ts
@@ -5,6 +5,25 @@
declare namespace globalThis {
declare namespace __bootstrap {
+ declare var infra: {
+ collectSequenceOfCodepoints(
+ input: string,
+ position: number,
+ condition: (char: string) => boolean,
+ ): {
+ result: string;
+ position: number;
+ };
+ };
+
+ declare var mimesniff: {
+ parseMimeType(input: string): {
+ type: string;
+ subtype: string;
+ parameters: Map<string, string>;
+ } | null;
+ };
+
declare var eventTarget: {
EventTarget: typeof EventTarget;
};