GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||
GeezerVison is showing github.com — lib: check number of arguments in `EventTarget`'s function by deokjinkim · Pull Request #45668 · nodejs/node Conversation
Contributor
For now, addEventListener() only checks number of arguments.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
I don't think it's necessary to be this strict (validating |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
As you can see in code change(lib/readline.js), I think wrong usage(ex. 1 argument is passed to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The readline change needs a test to verify the cleanup function is working correctly if there isn't already one. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can you check if there's a WPT test for this?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
I disagree, I think it is necessary so our implementation is compliant with the WebIDL spec, and aligns with the other runtimes. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Could you send another PR for this fix so it can be backported more easily?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Created another PR(#45676) to resolve this issue. PTAL.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That shouldn’t be necessary, commits that land on main are automatically back ported to current and active LTS release lines after the appropriate “maturation period”, backport PRs are necessary only if the commit doesn’t apply cleanly.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you for kind explanation. It's very helpful for me 👍
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I couldn't find the same test in dom/event of WPT(https://github.com/web-platform-tests/wpt/tree/master/dom/events). BTW, chrome samples have similar tests. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
For now, addEventListener() only checks number of arguments. removeEventListener() and dispatchEvent() also need checking number of arguments.
604b3c8 to
cc631b2
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Antoine du Hamel <[email protected]>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in c776324 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
For now, addEventListener() only checks number of arguments. removeEventListener() and dispatchEvent() also need checking number of arguments. PR-URL: #45668 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
For now, addEventListener() only checks number of arguments. removeEventListener() and dispatchEvent() also need checking number of arguments. PR-URL: #45668 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
For now, addEventListener() only checks number of arguments. removeEventListener() and dispatchEvent() also need checking number of arguments. PR-URL: #45668 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
For now, addEventListener() only checks number of arguments. removeEventListener() and dispatchEvent() also need checking number of arguments. PR-URL: #45668 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
For now, addEventListener() only checks number of arguments. removeEventListener() and dispatchEvent() also need checking number of arguments. PR-URL: #45668 Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Daeyeon Jeong <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.