I wrote javascript that dynamically edits the svg element. I want to get a new line of an edited svg element, but currently my code is not working. I found the following code here to get a lowercase form of an HTML document.
var txt = document.documentElement.innerHTML;
I just want the innerHTML an SVG element. I tried the following code but got the error "undefined".
var svgnode=document.getElementById("svgnode1"); alert(svgnode.innerHTML);
How to do it. The error occurs in Google Chrome, but I want the solution to work in any browser.
source share