Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 453df77

Browse filesBrowse files
KhafraDevmarco-ippolito
authored andcommitted
events: return currentTarget when dispatching
PR-URL: #54642 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mattias Buelens <mattias@buelens.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3a682cc commit 453df77
Copy full SHA for 453df77

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/event_target.js‎

Copy file name to clipboardExpand all lines: lib/internal/event_target.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class Event {
200200
get currentTarget() {
201201
if (!isEvent(this))
202202
throw new ERR_INVALID_THIS('Event');
203-
return this[kTarget];
203+
return this[kIsBeingDispatched] ? this[kTarget] : null;
204204
}
205205

206206
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.