events: add max listener warning for EventTarget#36001
events: add max listener warning for EventTarget#36001jasnell wants to merge 1 commit intonodejs:masterfrom
Conversation
benjamingr
left a comment
There was a problem hiding this comment.
Looks good - except the static on EventTarget.
Domenic pointed me towards https://heycam.github.io/webidl/#create-an-interface-object that does not allow adding additional properties.
This comment has been minimized.
This comment has been minimized.
34e87e4 to
53dc04d
Compare
This comment has been minimized.
This comment has been minimized.
|
@jasnell would it be possible to make it static on I think the DOM people and spec feel very strongly that once there are things added it's no longer a spec compliant EventTarget. |
|
Possible, yes, ideal, no? It would end up needing to be something like... Because the limit should be settable per |
|
Ok, this is the approach I just implemented: It's not pretty but it works. |
53dc04d to
abb7409
Compare
This comment has been minimized.
This comment has been minimized.
abb7409 to
1f87c08
Compare
I wouldn't see why not to be honest. They are functionally consistent with each other. |
| --> | ||
|
|
||
| * `n` {number} A non-negative number. The maximum number of listeners per | ||
| `EventTarget` event. |
There was a problem hiding this comment.
| `EventTarget` event. | |
| `EventTarget` or `EventEmitter`. |
| `EventTarget` event. | ||
| * `...eventsTargets` {EventTarget[]|EventEmitter[]} Zero or more {EventTarget} | ||
| or {EventEmitter} instances. If none are specified, `n` is set as the default | ||
| max for all newly created {EventTarget} and {EventEmitter} objects. |
There was a problem hiding this comment.
| max for all newly created {EventTarget} and {EventEmitter} objects. | |
| maximum for all newly-created {EventTarget} and {EventEmitter} objects. |
|
Landed in cd31340...dc79f3f |
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: TODO
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: TODO
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: #36232
Notable changes: dns: * (SEMVER-MINOR) add a cancel() method to the promise Resolver (Szymon Marczak) #33099 events: * (SEMVER-MINOR) add max listener warning for EventTarget (James M Snell) #36001 http: * (SEMVER-MINOR) add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 http2: * (SEMVER-MINOR) allow setting the local window size of a session (Yongsheng Zhang) #35978 lib: * (SEMVER-MINOR) add throws option to fs.f/l/statSync (Andrew Casey) #33716 path: * (SEMVER-MINOR) add `path/posix` and `path/win32` alias modules (ExE Boss) #34962 readline: * (SEMVER-MINOR) add getPrompt to get the current prompt (Mattias Runge-Broberg) #33675 src: * (SEMVER-MINOR) add loop idle time in diagnostic report (Gireesh Punathil) #35940 util: * (SEMVER-MINOR) add `util/types` alias module (ExE Boss) #34055 PR-URL: #36232
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#36001 Fixes: nodejs#35990 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#36001 Fixes: nodejs#35990 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: nodejs#36001 Fixes: nodejs#35990 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Fixes: #35990
Signed-off-by: James M Snell jasnell@gmail.com
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes