mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 18:12:39 +00:00
Web API: CustomEvent (#1505)
This commit is contained in:
parent
77114fbda4
commit
e470f31d32
8 changed files with 132 additions and 2 deletions
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue