(relativeUrlString, baseUrl)
| 542 | * @return {string} |
| 543 | */ |
| 544 | export function resolveRelativeUrl(relativeUrlString, baseUrl) { |
| 545 | baseUrl = urlAsLocation(baseUrl); |
| 546 | if (mode.isEsm() || typeof URL == 'function') { |
| 547 | return new URL(relativeUrlString, baseUrl.href).toString(); |
| 548 | } |
| 549 | return resolveRelativeUrlFallback_(relativeUrlString, baseUrl); |
| 550 | } |
| 551 | |
| 552 | /** |
| 553 | * Returns absolute URL resolved based on the relative URL and the element. |
no test coverage detected