sdk/src/third-party/easyXDM/easyXDM.js
function resolveUrl(url){
    
    // replace all // except the one in proto with /
    url = url.replace(reDoubleSlash, "$1/");
    
    // If the url is a valid url we do nothing
    if (!url.match(/^(http||https):\/\//)) {
        // If this is a relative path
        var path = (url.substring(0, 1) === "/") ? "" : location.pathname;
        if (path.substring(path.length - 1) !== "/") {
            path = path.substring(0, path.lastIndexOf("/") + 1);
        }
        
        url = location.protocol + "//" + location.host + path + url;
    }
    
    // reduce all 'xyz/../' to just '' 
    while (reParent.test(url)) {
        url = url.replace(reParent, "");
    }
    
    return url;
}
function resolveUrl(url){
    
    // replace all // except the one in proto with /
    url = url.replace(reDoubleSlash, "$1/");
    
    // If the url is a valid url we do nothing
    if (!url.match(/^(http||https):\/\//)) {
        // If this is a relative path
        var path = (url.substring(0, 1) === "/") ? "" : location.pathname;
        if (path.substring(path.length - 1) !== "/") {
            path = path.substring(0, path.lastIndexOf("/") + 1);
        }
        
        url = location.protocol + "//" + location.host + path + url;
    }
    
    // reduce all 'xyz/../' to just '' 
    while (reParent.test(url)) {
        url = url.replace(reParent, "");
    }
    
    return url;
}
function resolveUrl ( url ) { // replace all // except the one in proto with / url = url . replace ( reDoubleSlash , "$1/" ) ; // If the url is a valid url we do nothing if ( ! url . match ( / ^(http||https):\/\/ / ) ) { // If this is a relative path var path = ( url . substring ( 0 , 1 ) === "/" ) ? "" : location . pathname ; if ( path . substring ( path . length - 1 ) !== "/" ) { path = path . substring ( 0 , path . lastIndexOf ( "/" ) + 1 ) ; } url = location . protocol + "//" + location . host + path + url ; } // reduce all 'xyz/../' to just ''  while ( reParent . test ( url ) ) { url = url . replace ( reParent , "" ) ; } return url ; }
Resolves a relative url into an absolute one.
@param {String} url The path to resolve.
@return {String} The resolved url.
Resolves a relative url into an absolute one .