Skip to content

Commit e3553eb

Browse files
committed
Change hostname using host
1 parent db261a9 commit e3553eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/url.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ console.log(myURL.href);
257257
// Prints https://example.org:81/foo
258258

259259
// Use myURL.host to change the hostname and port
260-
myURL.host = 'example.org:82';
260+
myURL.host = 'example.com:82';
261261
console.log(myURL.href);
262-
// Prints https://example.org:82/foo
262+
// Prints https://example.com:82/foo
263263
```
264264

265265
Invalid host name values assigned to the `hostname` property are ignored.

0 commit comments

Comments
 (0)