events: deal with no argument case#33611
Closed
benjamingr wants to merge 5 commits into
Closed
Conversation
targos
reviewed
May 28, 2020
48b30da to
cea4961
Compare
Member
Author
|
@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
Collaborator
Collaborator
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>
Member
Author
2 tasks
2 tasks
c4961e4 to
7a1f27e
Compare
Collaborator
Collaborator
Member
|
@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]');
} |
Member
Author
|
@jasnell pushed a fix, feel free to push such fixed on my (ET) branches in the future and thanks for landing. |
a5bba69 to
f912eec
Compare
This was referenced Jun 4, 2020
Collaborator
Collaborator
Collaborator
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.