Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: clarify url doc #19899

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ return `true`.
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)`.

The `base` is ignored if the `input` is an absolute URL.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Micro-nit: Remove the two instances of the as we do not prefix variable names with it generally. I see we do it in the immediately preceding paragraph so I'm fine if you want to ignore this comment, as at least it's consistent in the immediate vicinity. But if you wanted to remove them from that paragraph too, cool by me.


```js
const myURL = new URL('/foo', 'https://example.org/');
// https://example.org/foo
Expand Down