Skip to content

Commit

Permalink
Change hostname using host
Browse files Browse the repository at this point in the history
  • Loading branch information
deokjinkim committed Dec 21, 2022
1 parent db261a9 commit e3553eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/url.md
Expand Up @@ -257,9 +257,9 @@ console.log(myURL.href);
// Prints https://example.org:81/foo

// Use myURL.host to change the hostname and port
myURL.host = 'example.org:82';
myURL.host = 'example.com:82';
console.log(myURL.href);
// Prints https://example.org:82/foo
// Prints https://example.com:82/foo
```

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

0 comments on commit e3553eb

Please sign in to comment.