title: Different Relative path inside External Js file
body: <p>I have an Html file on 1 domain (let's say <a href="https://a.com" rel="nofollow noreferrer">https://a.com</a>) that calls a Javascript file on a different domain (let's call this <a href="https://b.com" rel="nofollow noreferrer">https://b.com</a>). One of the functions of the JS file is to load SVG files. The SVG files are hosted on domain b so the JS file uses a relative path to load the SVG file. The Issue I am finding is that since the HTML file is on domain A, the Javascript file is using the relative path from domain a. </p>
  
  <p>Is it possible to change something in the html to have the JS file look at domain b instead of domain a? I do not have access to the JS file to do any modifications.
  Here is how I am currently pulling the Js file</p>
  
  <pre><code>&lt;script src="https://b.com/site/static/main-850382.js" async&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Below is the JS function for reference.</p>
  
  <pre><code>    function o(e, t) {
      for (var n = 0; n &lt; t.length; n++) {
          var i = t[n];
          i.enumerable = i.enumerable || !1,
          i.configurable = !0,
          "value"in i &amp;&amp; (i.writable = !0),
          Object.defineProperty(e, i.key, i)
      }
  }
  var a = function() {
      function e(t) {
          !function(e, t) {
              if (!(e instanceof t))
                  throw new TypeError("Cannot call a class as a function")
          }(this, e);
          var n = t.dataset.name
            , i = "/site/static/svgs/".concat(n, ".svg")
            , r = t.dataset.svgTitle;
          n &amp;&amp; e.renderSVG(i, t, r)
      }
      var t, n, i;
      return t = e,
      i = [{
          key: "renderSVG",
          value: function(e, t, n) {
              var i = new XMLHttpRequest;
              i.addEventListener("load", (function() {
                  if (200 === i.status &amp;&amp; (t.innerHTML = i.responseText,
                  n)) {
                      var e = t.getElementsByTagName("svg")[0]
                        , r = e.getElementsByTagName("title")[0]
                        , o = Math.floor(1e3 * Math.random());
                      r ? (r.textContent = n,
                      r.id = o) : e.insertAdjacentHTML("afterBegin", '&lt;title id="'.concat(o, '"&gt;').concat(n, "&lt;/title&gt;")),
                      e.setAttribute("aria-labelledby", o)
                  }
              }
              )),
              i.open("GET", e),
              i.send()
          }
      }],
      (n = null) &amp;&amp; o(t.prototype, n),
      i &amp;&amp; o(t, i),
      e
  }();
  t.default = a;
  </code></pre>