resolve-relative-url
Introduction:
Resolve a possibly relative URL agains a source URL. If the URL is not relative, return it unchanged.
(link, source)
Resolve a possibly relative URL
Arguments
link
- A possibly relative URL.source
- Source URL.
Example
var resolveRelative = ; var resolvedURL = ;// http://www.somedomain.com/banner.imgvar resolvedURL = ;// https://www.otherdomain.com/banner.imgvar resolvedURL = ;// https://www.somedomain.com