feat: implement Event and EventTarget

This commit is contained in:
shirakaba
2022-11-29 19:23:05 +09:00
parent 933af70d39
commit 0fe149c9e1
5 changed files with 59 additions and 36 deletions

View File

@@ -10,7 +10,7 @@ const timeOrigin = Date.now();
*/
const emptyArray = [] as const;
export class DOMEvent {
export class DOMEvent implements Event {
/**
* @private
* Internal API to facilitate testing - to be removed once we've completed
@@ -119,7 +119,7 @@ export class DOMEvent {
// From CustomEvent rather than Event. Can consider factoring out this
// aspect into DOMCustomEvent.
private readonly detail: unknown | null;
readonly detail: unknown | null;
private propagationState: EventPropagationState = EventPropagationState.resume;