-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
eventtargetIssues and PRs related to the EventTarget implementation.Issues and PRs related to the EventTarget implementation.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
Description
Version
v22
Platform
Linux DESKTOP-L4O1H93 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
events
What steps will reproduce the bug?
const ev = new Event('')
ev.stopPropagation = () => {
console.log('???')
}
ev.cancelBubble = true
How often does it reproduce? Is there a required condition?
n/a
What is the expected behavior? Why is that the expected behavior?
nothing to be printed
What do you see instead?
???
Additional information
node/lib/internal/event_target.js
Lines 304 to 310 in 9c714d8
set cancelBubble(value) { | |
if (!isEvent(this)) | |
throw new ERR_INVALID_THIS('Event'); | |
if (value) { | |
this.stopPropagation(); | |
} | |
} |
Metadata
Metadata
Assignees
Labels
eventtargetIssues and PRs related to the EventTarget implementation.Issues and PRs related to the EventTarget implementation.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.