Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [#1747] Event phases should be on both class and instance #1748

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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