diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-07-16 13:19:26 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-07-16 00:19:26 -0400 |
commit | 9c454998646ef49f652bc919f53503ed07a1c55c (patch) | |
tree | a6275bdefa3da50cae08c6c0f753d816215d9602 /js/dom_types.ts | |
parent | bd6ebb32df11641e148fd0adca41e7188f16afce (diff) |
Support window.onload (#2643)
Diffstat (limited to 'js/dom_types.ts')
-rw-r--r-- | js/dom_types.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/js/dom_types.ts b/js/dom_types.ts index 07f7d7898..a7c36df32 100644 --- a/js/dom_types.ts +++ b/js/dom_types.ts @@ -71,11 +71,16 @@ export enum NodeType { DOCUMENT_FRAGMENT_NODE = 11 } +export const eventTargetHost: unique symbol = Symbol(); +export const eventTargetListeners: unique symbol = Symbol(); +export const eventTargetMode: unique symbol = Symbol(); +export const eventTargetNodeType: unique symbol = Symbol(); + export interface EventTarget { - host: EventTarget | null; - listeners: { [type in string]: EventListener[] }; - mode: string; - nodeType: NodeType; + [eventTargetHost]: EventTarget | null; + [eventTargetListeners]: { [type in string]: EventListener[] }; + [eventTargetMode]: string; + [eventTargetNodeType]: NodeType; addEventListener( type: string, callback: (event: Event) => void | null, |