Skip to content
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
1 change: 1 addition & 0 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ WHATWG URL's `origin` property includes `protocol` and `host`, but not
Parsing the URL string using the WHATWG API:

```js
const URL = require('url').URL
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now that URL is global, this is not strictly required. This might be improved by explaining that distinction?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I know it works global :)
I'm thinking out loud in this PR whether we want to promote that or not and yes to make one or the other more explicit so devs are aware.

const myURL =
new URL('https://user:pass@sub.example.com:8080/p/a/t/h?query=string#hash');
```
Expand Down