So, I have a function like this:
var elem = document.createElement( 'svg' ); elem.id = 'svg1';
and I would like, in a later function, to be able to capture this element through document.getElementById('svg1')
.
I found this to not work, and through some research, also known as google, I found that adding an element in this way does not actually add it to the node tree. How can I create an element to subsequently reference an Id?
source share