<svg>
  <rect fill="url(#coin) red" stroke="black"
        height="100%" width="100%" />
</svg>

svg.defs-only {
    display:block; position: absolute; 
    height:0; width:0; margin: 0; padding: 0; 
    border: none; overflow: hidden;
}
var ajax = new XMLHttpRequest();
ajax.open("GET", "https://s3-us-west-2.amazonaws.com/s.cdpn.io/91525/potofgold.svg", true);
ajax.responseType = "document";
ajax.onload = function(e) {
  try {
    svg = ajax.responseXML.documentElement;
    svg.setAttribute("class", "defs-only");
    //not essential, just used to trigger CSS to hide the SVG
    document.body.insertBefore(svg,
              document.body.childNodes[0]);
  }
  catch(e){console.log(e);}
}
ajax.send();

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.