Skip to content

Commit

Permalink
doc: fix wrong output of example in url.protocol
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
deokjinkim authored and RafaelGSS committed Jan 4, 2023
1 parent 7d89e02 commit 81f39a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 81f39a8

Please sign in to comment.