jcblw / vsvg

〰️ A minimal virtual svg dom that allows some basic dom Node api methods.
https://www.npmjs.org/package/vsvg
14 stars 1 forks source link

Text nodes should not show up in children list. #7

Closed jcblw closed 9 years ago

jcblw commented 9 years ago

While walking the actual DOM textNodes will not show up in the children Array. I think we can make the children array private and expose a getter that filters out the text nodes.

jcblw commented 9 years ago

VSVG - mount

things that need to be done,

VSVG.mount( node );
VSVG.mount = function( node ) {
    var elem = VSVG[ node.tagName ]( );
    elem._node = node;
    // get the attributes
    // get the styles
    elem._children = node.children.map( this.mount );
    return elem;
}
jcblw commented 9 years ago

wth that last comment should be for #6

this is actually resolved on 604651906a1cb124311e13ea48412020fbc18fe4