I'm trying to let the user manipulate an avatar, with svg.js in Ionic 3, by replacing parts of the avatar (i.e. g tags representing the face, arms, etc.).
I load the avatar svg as an object, select the svg tag and 'adopt' it with svg.js as in the code below, but I can't access any of the children.
<object id="defaultGirl" type="image/svg+xml" data="assets/avatar/default-girl.svg" class=""></object>
let a: any = document.getElementById("defaultAvatarObj")
let b: any = a.contentDocument
let c: any = b.querySelector('svg')
let d: any = SVG.adopt(c)
let e: any = d.children()
console.log(e) // displays *[initializer]* -- an array with an 'initializer' object, rather than the children
Thanks in advance for any help!