File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,19 @@ url.resolve('http://example.com/', '/one') // 'http://example.com/one'
235235url .resolve (' http://example.com/one' , ' /two' ) // 'http://example.com/two'
236236```
237237
238+ Note that ` url.resolve() ` method depends on the protocol given in the ` from ` parameter.
239+ Some protocols like ` https ` , ` file ` , ` ftp ` , ` wss ` and ` gopher ` have special cases.
240+
241+ For example:
242+
243+ ``` js
244+ url .resolve (' https://foo.tld' , ' bar' ) // 'https://foo.tld/bar'
245+ url .resolve (' wss://foo.tld' , ' bar' ) // 'wss://bar'
246+ url .resolve (' ftps://foo.tld' , ' bar' ) // 'ftps://bar'
247+ ```
248+
249+ Although, the uniform behaviour of the method is achieved when the URL ends with a slash.
250+
238251## Escaped Characters
239252
240253URLs are only permitted to contain a certain range of characters. Spaces (` ' ' ` )
You can’t perform that action at this time.
0 commit comments