Tengo el siguiente código que dibuja un elemento rect en el cuadro svg con fondo azul y borde rosa. Me gustaría cambiar el fondo azul con una imagen .svg y el borde rosa con otra imagen .svg.
//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");