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 <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
deokjinkim authored and RafaelGSS committed Jan 5, 2023
1 parent 86e30fc commit 4457e05
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 4457e05

Please sign in to comment.