When loading the page, the image is not visible (image = document.createElementNS (" http://www.w3.org/2000/svg ", 'image');)) But If in the object inspector, in Google Devs, copy the html code of the image and paste - the picture is displayed
var svg = document.createElementNS("http://www.w3.org/2000/svg","svg"); var el = document.getElementById('container') el.appendChild(svg) var image = document.createElementNS("http://www.w3.org/2000/svg", 'image'); image.setAttribute('width' , '400px') image.setAttribute('height' , '400px') image.setAttribute('x' , '0') image.setAttribute('y' , '0') image.setAttribute('xlink:href' , 'http://picfun.ru/wp-content/uploads/HTxyUcwXfw.jpg') svg.appendChild(image) http://codepen.io/anon/pen/rLROpB?editors=1010