Skip to content

Commit

Permalink
events: unlink stopPropagation and cancelBubble methods
Browse files Browse the repository at this point in the history
WHATWG spec does not define any explicit relationship between
stopPropagation and cancelBubble, the methods' responsibilities are
simply to "set this’s stop propagation flag"
under varying circumstances.

Fixes: nodejs#50401
  • Loading branch information
Scout2012 committed Dec 6, 2023
1 parent 9def0a9 commit e87ed58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/event_target.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ class Event {
if (!isEvent(this))
throw new ERR_INVALID_THIS('Event');
if (value) {
this.stopPropagation();
this.#propagationStopped = true;
}
}

Expand Down

0 comments on commit e87ed58

Please sign in to comment.