Commit 9ed9aa8
lib: add ability to add separate event name to defineEventHandler
Adds an optional third argument to `defineEventHandler()` to specify
an event name that is separate from the name used for the property.
This will be used, for instance, by the quic implementation to support
generating the `on...` events where the event name itself is hyphenated.
For instance `defineEventHandler(target, 'streamreset', 'stream-reset')`
Separated out from #44325
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #45032
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent 2105f09 commit 9ed9aa8Copy full SHA for 9ed9aa8
File tree
Expand file treeCollapse file tree
2 files changed
+20
-11
lines changedOpen diff view settings
Filter options
- lib/internal
- test/parallel
Expand file treeCollapse file tree
2 files changed
+20
-11
lines changedOpen diff view settings
Collapse file
lib/internal/event_target.js
Copy file name to clipboardExpand all lines: lib/internal/event_target.js+11-11Lines changed: 11 additions & 11 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1022 | 1022 | |
1023 | 1023 | |
1024 | 1024 | |
1025 | | - |
| 1025 | + |
1026 | 1026 | |
1027 | 1027 | |
1028 | 1028 | |
1029 | 1029 | |
1030 | | - |
| 1030 | + |
1031 | 1031 | |
1032 | 1032 | |
1033 | 1033 | |
| ||
1036 | 1036 | |
1037 | 1037 | |
1038 | 1038 | |
1039 | | - |
| 1039 | + |
1040 | 1040 | |
1041 | 1041 | |
1042 | | - |
1043 | | - |
1044 | | - |
| 1042 | + |
| 1043 | + |
| 1044 | + |
1045 | 1045 | |
1046 | 1046 | |
1047 | 1047 | |
1048 | | - |
1049 | | - |
1050 | | - |
| 1048 | + |
| 1049 | + |
| 1050 | + |
1051 | 1051 | |
1052 | 1052 | |
1053 | 1053 | |
1054 | | - |
| 1054 | + |
1055 | 1055 | |
1056 | | - |
| 1056 | + |
1057 | 1057 | |
1058 | 1058 | |
1059 | 1059 | |
|
Collapse file
test/parallel/test-eventtarget.js
Copy file name to clipboardExpand all lines: test/parallel/test-eventtarget.js+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
614 | 614 | |
615 | 615 | |
616 | 616 | |
| 617 | + |
| 618 | + |
| 619 | + |
| 620 | + |
| 621 | + |
| 622 | + |
| 623 | + |
| 624 | + |
| 625 | + |
617 | 626 | |
618 | 627 | |
619 | 628 | |
|
0 commit comments