Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 29d509c

Browse filesBrowse 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
Copy full SHA for 29d509c

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎doc/api/url.md‎

Copy file name to clipboardExpand all lines: doc/api/url.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.