GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — events: check signal before listener · nodejs/node@3dcdab3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal
    • event_target.js
  • test/wpt/status/dom
    • events.json
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/event_target.js‎

Copy file name to clipboardExpand all lines: lib/internal/event_target.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,8 @@ class EventTarget {
561561
weak,
562562
} = validateEventListenerOptions(options);
563563

564+
validateAbortSignal(signal, 'options.signal');
565+
564566
if (!validateEventListener(listener)) {
565567
// The DOM silently allows passing undefined as a second argument
566568
// No error code for this since it is a Warning
@@ -575,8 +577,6 @@ class EventTarget {
575577
}
576578
type = String(type);
577579

578-
validateAbortSignal(signal, 'options.signal');
579-
580580
if (signal) {
581581
if (signal.aborted) {
582582
return;
Collapse file

‎test/wpt/status/dom/events.json‎

Copy file name to clipboardExpand all lines: test/wpt/status/dom/events.json
-7Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
]
99
}
1010
},
11-
"AddEventListenerOptions-signal.any.js": {
12-
"fail": {
13-
"expected": [
14-
"Passing null as the signal should throw (listener is also null)"
15-
]
16-
}
17-
},
1811
"Event-constructors.any.js": {
1912
"fail": {
2013
"expected": [

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.