In the URL
constructor documentation, it’s written that the parameter base has ''
as default value. But using ''
for base, I get the following error (same with Chromium or Node.js):
new URL('http://foo.com', '')
// Uncaught TypeError: URL constructor: is not a valid URL.
With undefined
or without base, the behavior is the same. The real default value is undefined
?