From 1100fb7e8994bdfb0db13e049ef710b1cdb90668 Mon Sep 17 00:00:00 2001 From: Rishabh Mehan Date: Fri, 5 Jun 2020 01:23:22 -0700 Subject: [PATCH 1/4] Correct the example output for url.hostname doc --- 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 49dcfbb418bb4f..473ad291568327 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -210,7 +210,7 @@ console.log(myURL.hostname); myURL.hostname = 'example.com:82'; console.log(myURL.href); -// Prints https://example.com:81/foo +// Prints https://example.com:82/foo ``` Invalid host name values assigned to the `hostname` property are ignored. From c3c580e7fdca232adcfb005fe06e1508b1b5f755 Mon Sep 17 00:00:00 2001 From: Rishabh Mehan Date: Sun, 5 Jul 2020 20:55:35 -0700 Subject: [PATCH 2/4] Update doc/api/url.md Co-authored-by: James M Snell --- doc/api/url.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api/url.md b/doc/api/url.md index 473ad291568327..2336fd5e780ca1 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -211,6 +211,11 @@ console.log(myURL.hostname); myURL.hostname = 'example.com:82'; console.log(myURL.href); // Prints https://example.com:82/foo + +// Use, myURL.host to change the hostname and port +myURL.host = 'example.org:82'; +console.log(myURL.href); +// Prints https://example.org:82/foo ``` Invalid host name values assigned to the `hostname` property are ignored. From 913e0bbe754b69e677c993e5c6a1d94b993376db Mon Sep 17 00:00:00 2001 From: Rishabh Mehan Date: Sun, 5 Jul 2020 20:56:19 -0700 Subject: [PATCH 3/4] Update doc/api/url.md Co-authored-by: James M Snell --- doc/api/url.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/api/url.md b/doc/api/url.md index 2336fd5e780ca1..30f7db5e546eca 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -208,6 +208,7 @@ const myURL = new URL('https://example.org:81/foo'); console.log(myURL.hostname); // Prints example.org +// Setting the hostname does not change the port myURL.hostname = 'example.com:82'; console.log(myURL.href); // Prints https://example.com:82/foo From bb980d85d84447b0771cf5a93261a37cf36d6ecf Mon Sep 17 00:00:00 2001 From: Rishabh Mehan Date: Mon, 16 Nov 2020 19:35:21 -0800 Subject: [PATCH 4/4] Update doc/api/url.md Co-authored-by: Antoine du Hamel --- 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 30f7db5e546eca..a890c1696d1645 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -211,7 +211,7 @@ console.log(myURL.hostname); // Setting the hostname does not change the port myURL.hostname = 'example.com:82'; console.log(myURL.href); -// Prints https://example.com:82/foo +// Prints https://example.com:81/foo // Use, myURL.host to change the hostname and port myURL.host = 'example.org:82';