We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2438656 commit 22b5611Copy full SHA for 22b5611
src/preamble.js
@@ -936,6 +936,8 @@ function isAbsoluteUrl(url) {
936
return /^(?:[a-z]+:)?\/\//i.test(url);
937
}
938
939
+// Joins relative URL 'b' to URL 'a'. 'a' may be empty, in which case 'b' is returned.
940
+// If 'b' is an absolute URL, then 'a' is ignored and 'b' is returned as-is as well.
941
function joinUrl(a, b) {
942
#if ASSERTIONS
943
if (a && !a.endsWith('/')) throw 'First parameter to joinUrl() should end in /!';
0 commit comments