### Version 19.9.0 ### Platform All ### Subsystem URL ### What is the expected behavior? Why is that the expected behavior? ```js URL.canParse() // => TypeError: at least 1 argument required, but 0 present. ``` ### What do you see instead? ```js URL.canParse() // => false ``` ### Additional information See the signature https://url.spec.whatwg.org/#url-class
Activity
jazelly commentedon Apr 11, 2023
zloirock commentedon Apr 11, 2023
@jazelly the type conversion / validation works correctly, so this comment is not related to this issue.
benjamingr commentedon Apr 11, 2023
Yeah passing no argument is different from passing something that gets coerced
jazelly commentedon Apr 11, 2023
Thanks for clarifying. Can I give this a try.
anonrig commentedon Apr 11, 2023
We are strictly following the whatwg spec. If you think we should throw an error, you should recommend adding a test to web platform tests.
zloirock commentedon Apr 11, 2023
Feel free to create a PR.
Since it's still an issue - it seems not - at least you're misinterpreting Web IDL - and it's not the first similar case #41450.
anonrig commentedon Apr 11, 2023
I think you're right, but we have to wait for a web-platform test.
KhafraDev commentedon Apr 11, 2023
@anonrig a wpt is unlikely to be added because it's an issue with webidl.
edit: I guess there might be tests in the idlharness, but I'm pretty sure the url tests are updated.
targos commentedon Apr 11, 2023
I don't think we should block bug fixes on WPT. We can add (and already have) our own tests.
add a fix for a NodeJS 19.9.0 `URL.canParse` bug
aduh95 commentedon Apr 13, 2023
Fixed by a07caf3
Update dependency core-js to v3.34.0 (#248)