Saturday 15 May 2010

dart - Difference between nodes and children -



dart - Difference between nodes and children -

the below code worked fine me:

var q = theqty.shadowroot.children[1].shadowroot.children[0];

while below code gave me error "there no such getter 'shadowroot' in 'node'" :

var q = theqty.shadowroot.nodes[1].shadowroot.nodes[0];

i not understand difference between using nodes(index) or using children(index), thought?

the children collection of type element, has shadowroot property, whereas nodes collection of base of operations class node. it's possible in cases these same (though checked mode in dartium still throw), there little number of other classes (like document, documentfragment) extend node not element.

dart

No comments:

Post a Comment