Web API: CustomEvent (#1505)

This commit is contained in:
Adam Conrad 2019-01-23 12:20:53 +00:00 committed by Ryan Dahl
parent 77114fbda4
commit e470f31d32
8 changed files with 132 additions and 2 deletions

View file

@ -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.
*/