Line 13: | Line 13: | ||
window.onload = () => { | window.onload = () => { | ||
var svg = document.getElementById("hero-image").getSVGDocument(); | var svg = document.getElementById("hero-image").getSVGDocument(); | ||
− | var segments = svg.getElementsByTagName("g"); | + | var segments = Array.prototype.slice.call(svg.getElementsByTagName("g")); |
− | + | var logs = segments.filter(function(e) {return e.id}); | |
− | + | console.log(logs); | |
} | } | ||
</script> | </script> |
Revision as of 10:31, 26 October 2017