diff options
author | Adam Conrad <422184+acconrad@users.noreply.github.com> | 2019-01-23 12:20:53 +0000 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-01-23 06:20:53 -0600 |
commit | e470f31d328884303e56f2f15a4121b8ffe097a6 (patch) | |
tree | 84e878d3c53db4f969c29357c7f5985b59c7d9f2 /js/dom_types.ts | |
parent | 77114fbda49382e397095d8214bd76996b0cfb57 (diff) |
Web API: CustomEvent (#1505)
Diffstat (limited to 'js/dom_types.ts')
-rw-r--r-- | js/dom_types.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/dom_types.ts b/js/dom_types.ts index 068ae9cfd..0c6814dae 100644 --- a/js/dom_types.ts +++ b/js/dom_types.ts @@ -144,6 +144,11 @@ export interface EventInit { composed?: boolean; } +export interface CustomEventInit extends EventInit { + // tslint:disable-next-line:no-any + detail?: any; +} + export enum EventPhase { NONE = 0, CAPTURING_PHASE = 1, @@ -182,6 +187,18 @@ export interface Event { readonly timeStamp: Date; } +export interface CustomEvent extends Event { + // tslint:disable-next-line:no-any + readonly detail: any; + initCustomEvent( + type: string, + bubbles?: boolean, + cancelable?: boolean, + // tslint:disable-next-line:no-any + detail?: any | null + ): void; +} + /* TODO(ry) Re-expose this interface. There is currently some interference * between deno's File and this one. */ |