Skip to content

Commit 29d509c

Browse files
deokjinkimjuanarbol
authored andcommitted
doc: fix wrong output of example in url.protocol
Tailing slash of url.href is ommited. PR-URL: #45954 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 325fc08 commit 29d509c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/url.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ For instance, changing from `http` to `https` works:
490490
const u = new URL('http://example.org');
491491
u.protocol = 'https';
492492
console.log(u.href);
493-
// https://example.org
493+
// https://example.org/
494494
```
495495

496496
However, changing from `http` to a hypothetical `fish` protocol does not
@@ -500,7 +500,7 @@ because the new protocol is not special.
500500
const u = new URL('http://example.org');
501501
u.protocol = 'fish';
502502
console.log(u.href);
503-
// http://example.org
503+
// http://example.org/
504504
```
505505

506506
Likewise, changing from a non-special protocol to a special protocol is also

0 commit comments

Comments
 (0)