code: function(baseUrl, url) {
    if (!resolveCache) {
      var iframe = document.createElement('iframe');
      document.documentElement.appendChild(iframe);
      var doc = iframe.contentWindow.document;
      var base = doc.createElement('base');
      doc.documentElement.appendChild(base);
      var a = doc.createElement('a');
      doc.documentElement.appendChild(a);
      iframe.parentNode.removeChild(iframe);
      resolveCache = {
        iframe: iframe,
        base: base,
        a: a
      };
    }
    resolveCache.base.href = baseUrl;
    resolveCache.a.href = url;
    return resolveCache.a.href;
  }
docs: Resolves a URL to an absolute path.
  @param {string} baseUrl Base URL.
  @param {string} url Target URL.