I have the following code which draws a rect element on the svg box with blue background and pink boarder. I would like to change the blue background with an .svg image and the pink boarder with another .svg image.
//how to put the border around the SVG element
var borderRect = document.createElementNS('http://www.w3.org/2000/svg','rect');
borderRect.setAttribute("id", "bRect");
borderRect.setAttribute("width", bb.width);
borderRect.setAttribute("height", newVboxH);
borderRect.setAttribute("x", bb.x);
borderRect.setAttribute("y", bb.y);
borderRect.setAttribute("style","fill:blue;stroke:pink;stroke-width:5;fill-opacity:0.1;stroke-opacity:0.9");