D3 how to select only child elements

is to select only child elements
No other descendant elements

Mar.28,2021

d3.select('body').node().children

d3 there is no way to get child elements directly, but there are native ones. I don't know if that's what you mean by child element , but just use the children attribute of the native dom object

.
Menu