-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
events: deal with no argument case #33611
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodejs-github-bot
added
the
errors
Issues and PRs related to JavaScript errors originated in Node.js core.
label
May 28, 2020
benjamingr
added
the
events
Issues and PRs related to the events subsystem / EventEmitter.
label
May 28, 2020
targos
reviewed
May 28, 2020
benjamingr
force-pushed
the
event-controller-compat
branch
from
May 28, 2020 14:19
48b30da
to
cea4961
Compare
@targos is this more of what you had in mind? |
targos
approved these changes
May 28, 2020
jasnell
approved these changes
May 28, 2020
BridgeAR
reviewed
May 28, 2020
BridgeAR
reviewed
May 28, 2020
BridgeAR
approved these changes
May 28, 2020
BridgeAR
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
May 29, 2020
benjamingr
added a commit
that referenced
this pull request
May 31, 2020
PR-URL: #33611 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2 tasks
2 tasks
benjamingr
force-pushed
the
event-controller-compat
branch
from
May 31, 2020 12:53
c4961e4
to
7a1f27e
Compare
@benjamingr ... the CI failure here can be fixed with the following change: diff --git a/test/parallel/test-eventtarget.js b/test/parallel/test-eventtarget.js
index 82a89caae1..783ca5eeab 100644
--- a/test/parallel/test-eventtarget.js
+++ b/test/parallel/test-eventtarget.js
@@ -408,6 +408,6 @@ ok(EventTarget);
{
const target = new EventTarget();
strictEqual(target.toString(), '[object EventTarget]');
- const event = new Event();
+ const event = new Event('');
strictEqual(event.toString(), '[object Event]');
} |
@jasnell pushed a fix, feel free to push such fixed on my (ET) branches in the future and thanks for landing. |
benjamingr
force-pushed
the
event-controller-compat
branch
from
June 4, 2020 09:45
a5bba69
to
f912eec
Compare
This was referenced Jun 4, 2020
benjamingr
force-pushed
the
event-controller-compat
branch
from
June 4, 2020 19:12
f912eec
to
9e77c56
Compare
8 tasks
jasnell
pushed a commit
that referenced
this pull request
Jun 5, 2020
PR-URL: #33611 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Landed in 2362378 |
This was referenced Jun 6, 2020
codebytere
pushed a commit
that referenced
this pull request
Jun 18, 2020
PR-URL: #33611 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Merged
codebytere
pushed a commit
that referenced
this pull request
Jun 30, 2020
PR-URL: #33611 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
errors
Issues and PRs related to JavaScript errors originated in Node.js core.
events
Issues and PRs related to the events subsystem / EventEmitter.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix
new Event()
to throw an error rather than behave likenew Event(undefined)
to align with browser behavior.make -j4 test
(UNIX), orvcbuild test
(Windows) passescc @jasnell
I'll be making a few of these (compatibility) PRs to align with Chrome's behavior as I run into issues and eventually port the WPTs (as suggested by @targos).
I'm keeping these small so it's easier to bikeshed things like error codes.