¿Cómo creo un elemento SVG con JavaScript? He intentado esto:Crear etiqueta SVG con JavaScript
var svg = document.createElement('SVG');
svg.setAttribute('style', 'border: 1px solid black');
svg.setAttribute('width', '600');
svg.setAttribute('height', '250');
svg.setAttribute('version', '1.1');
svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
document.body.appendChild(svg);
Sin embargo, crea un elemento SVG con un ancho de cero y altura cero.
qué navegador estás haciendo esto con? –