Commit 03fb789
authored
events: add null check for the signal of EventTarget
This will improve the Web compatibility.
Passing null as the signal should throw an error.
WPT says "Passing null as the signal should throw".
Please see https://github.com/web-platform-tests/wpt/blob/master/dom/events/AddEventListenerOptions-signal.any.js
PR-URL: #43153
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 4884746 commit 03fb789Copy full SHA for 03fb789
File tree
Expand file treeCollapse file tree
3 files changed
+12
-2
lines changedOpen diff view settings
Filter options
- lib/internal
- test
- parallel
- wpt/status/dom
Expand file treeCollapse file tree
3 files changed
+12
-2
lines changedOpen diff view settings
Collapse file
lib/internal/event_target.js
Copy file name to clipboardExpand all lines: lib/internal/event_target.js+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
34 | 34 | |
35 | 35 | |
36 | 36 | |
37 | | - |
| 37 | + |
38 | 38 | |
39 | 39 | |
40 | 40 | |
| ||
575 | 575 | |
576 | 576 | |
577 | 577 | |
| 578 | + |
| 579 | + |
578 | 580 | |
579 | 581 | |
580 | 582 | |
|
Collapse file
test/parallel/test-whatwg-events-add-event-listener-options-signal.js
Copy file name to clipboardExpand all lines: test/parallel/test-whatwg-events-add-event-listener-options-signal.js+9Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
4 | 4 | |
5 | 5 | |
6 | 6 | |
| 7 | + |
7 | 8 | |
8 | 9 | |
9 | 10 | |
| ||
157 | 158 | |
158 | 159 | |
159 | 160 | |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
Collapse file
test/wpt/status/dom/events.json
Copy file name to clipboardExpand all lines: test/wpt/status/dom/events.json-1Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | | - |
15 | 14 | |
16 | 15 | |
17 | 16 | |
|
0 commit comments