This me constructing a styled SVG rectangle with the normal DOM API:
var inboundRect = document.createElementNS(SVG_NS, "rect");
inboundRect.setAttribute("class", "borderLink linkRect");
inboundRect.setAttribute("x", -padding);
inboundRect.setAttribute("y", -(textOffset+padding));
inboundRect.setAttribute("width", "0")
inboundRect.setAttribute("height", "15")
This is with E4X:
var inboundRect =
<rect xmlns="{SVG_NS}" class="borderLink linkRect" width="0" height="15" x="{-padding}" y="{-(textOffset+padding)}">
I rest my case. This is already in Rhino, so (*BOUNCE* *BOUNCE*) I can probably use it in Gradient. JOY!