From 4457e051c93d220ee93a029c97840487dbb8e32f Mon Sep 17 00:00:00 2001 From: Deokjin Kim Date: Sat, 24 Dec 2022 15:14:22 +0900 Subject: [PATCH] doc: remove port from example in `url.hostname` If port is used for `url.hostname`, `url.hostname` is not working. So remove port from example in `url.hostname`. PR-URL: https://github.com/nodejs/node/pull/45927 Reviewed-By: Antoine du Hamel Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Luigi Pinca --- doc/api/url.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/url.md b/doc/api/url.md index 389571ee94fba9..a7f1d6f0bd3b53 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -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