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 986dbb3

Browse filesBrowse files
Trottruyadorno
authored andcommitted
doc: clarify treatment of non-string argument to new URL()
Closes: #41653 PR-URL: #41658 Fixes: #41653 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 30df37f commit 986dbb3
Copy full SHA for 986dbb3

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎doc/api/url.md‎

Copy file name to clipboardExpand all lines: doc/api/url.md
+2-1Lines changed: 2 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ return `true`.
131131

132132
* `input` {string} The absolute or relative input URL to parse. If `input`
133133
is relative, then `base` is required. If `input` is absolute, the `base`
134-
is ignored.
134+
is ignored. If `input` is not a string, it is [converted to a string][] first.
135135
* `base` {string|URL} The base URL to resolve against if the `input` is not
136136
absolute.
137137

@@ -1701,6 +1701,7 @@ console.log(myURL.origin);
17011701
[`url.toString()`]: #urltostring
17021702
[`urlSearchParams.entries()`]: #urlsearchparamsentries
17031703
[`urlSearchParams@@iterator()`]: #urlsearchparamssymboliterator
1704+
[converted to a string]: https://tc39.es/ecma262/#sec-tostring
17041705
[examples of parsed URLs]: https://url.spec.whatwg.org/#example-url-parsing
17051706
[host name spoofing]: https://hackerone.com/reports/678487
17061707
[legacy `urlObject`]: #legacy-urlobject

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.