Skip to content

Commit

Permalink
doc: remove port from example in url.hostname
Browse files Browse the repository at this point in the history
If port is used for `url.hostname`, `url.hostname`
is not working. So remove port from example in
`url.hostname`.

PR-URL: #45927
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
deokjinkim authored and juanarbol committed Jan 31, 2023
1 parent 10a276a commit 83875f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ console.log(myURL.hostname);
// Prints example.org

// Setting the hostname does not change the port
myURL.hostname = 'example.com:82';
myURL.hostname = 'example.com';
console.log(myURL.href);
// Prints https://example.com:81/foo

Expand Down

0 comments on commit 83875f4

Please sign in to comment.