Skip to content

Commit

Permalink
doc: clarify treatment of non-string base in URL()
Browse files Browse the repository at this point in the history
PR-URL: #41685
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
Trott authored and danielleadams committed Mar 14, 2022
1 parent 92e6cf0 commit 018ec32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ return `true`.
* `input` {string} The absolute or relative input URL to parse. If `input`
is relative, then `base` is required. If `input` is absolute, the `base`
is ignored. If `input` is not a string, it is [converted to a string][] first.
* `base` {string|URL} The base URL to resolve against if the `input` is not
absolute.
* `base` {string} The base URL to resolve against if the `input` is not
absolute. If `base` is not a string, it is [converted to a string][] first.

Creates a new `URL` object by parsing the `input` relative to the `base`. If
`base` is passed as a string, it will be parsed equivalent to `new URL(base)`.
Expand Down

0 comments on commit 018ec32

Please sign in to comment.