summaryrefslogtreecommitdiff
path: root/op_crates/web/lib.deno_web.d.ts
diff options
context:
space:
mode:
authorLuca Casonato <lucacasonato@yahoo.com>2020-12-26 18:15:30 +0100
committerGitHub <noreply@github.com>2020-12-26 18:15:30 +0100
commit9419c06ab5e9f7fb258e7a48093f17f6d2511ea6 (patch)
tree84a6f43c8bc80acca7b50629511b3d33185bf7e4 /op_crates/web/lib.deno_web.d.ts
parente8587c86bf94eec35ccdae5b5aa0cffc70d59563 (diff)
chore: move ProgressEvent type to deno.web lib (#8878)
Diffstat (limited to 'op_crates/web/lib.deno_web.d.ts')
-rw-r--r--op_crates/web/lib.deno_web.d.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/op_crates/web/lib.deno_web.d.ts b/op_crates/web/lib.deno_web.d.ts
index 2175a5192..33d867753 100644
--- a/op_crates/web/lib.deno_web.d.ts
+++ b/op_crates/web/lib.deno_web.d.ts
@@ -148,6 +148,23 @@ interface EventListenerOptions {
capture?: boolean;
}
+interface ProgressEventInit extends EventInit {
+ lengthComputable?: boolean;
+ loaded?: number;
+ total?: number;
+}
+
+/** Events measuring progress of an underlying process, like an HTTP request
+ * (for an XMLHttpRequest, or the loading of the underlying resource of an
+ * <img>, <audio>, <video>, <style> or <link>). */
+declare class ProgressEvent<T extends EventTarget = EventTarget> extends Event {
+ constructor(type: string, eventInitDict?: ProgressEventInit);
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly target: T | null;
+ readonly total: number;
+}
+
/** Decodes a string of data which has been encoded using base-64 encoding.
*
* console.log(atob("aGVsbG8gd29ybGQ=")); // outputs 'hello world'