mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
doc: fix wrong output of example in url.protocol
Tailing slash of url.href is ommited. PR-URL: https://github.com/nodejs/node/pull/45954 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
0f23daae95
commit
e27012b248
@ -490,7 +490,7 @@ For instance, changing from `http` to `https` works:
|
||||
const u = new URL('http://example.org');
|
||||
u.protocol = 'https';
|
||||
console.log(u.href);
|
||||
// https://example.org
|
||||
// https://example.org/
|
||||
```
|
||||
|
||||
However, changing from `http` to a hypothetical `fish` protocol does not
|
||||
@ -500,7 +500,7 @@ because the new protocol is not special.
|
||||
const u = new URL('http://example.org');
|
||||
u.protocol = 'fish';
|
||||
console.log(u.href);
|
||||
// http://example.org
|
||||
// http://example.org/
|
||||
```
|
||||
|
||||
Likewise, changing from a non-special protocol to a special protocol is also
|
||||
|
Loading…
Reference in New Issue
Block a user