Skip to content

Commit

Permalink
fix: [#1747] Event phases should be on both class and instance
Browse files Browse the repository at this point in the history
  • Loading branch information
alan910127 committed Feb 26, 2025
1 parent 73a3672 commit 9abc5d3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/happy-dom/src/event/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ import Document from '../nodes/document/Document.js';
* Event.
*/
export default class Event {
public NONE = EventPhaseEnum.none;
public CAPTURING_PHASE = EventPhaseEnum.capturing;
public AT_TARGET = EventPhaseEnum.atTarget;
public BUBBLING_PHASE = EventPhaseEnum.bubbling;
public static NONE = EventPhaseEnum.none;
public static CAPTURING_PHASE = EventPhaseEnum.capturing;
public static AT_TARGET = EventPhaseEnum.atTarget;
public static BUBBLING_PHASE = EventPhaseEnum.bubbling;

public NONE = Event.NONE;
public CAPTURING_PHASE = Event.CAPTURING_PHASE;
public AT_TARGET = Event.AT_TARGET;
public BUBBLING_PHASE = Event.BUBBLING_PHASE;

public [PropertySymbol.composed] = false;
public [PropertySymbol.bubbles] = false;
Expand Down

0 comments on commit 9abc5d3

Please sign in to comment.