JSFiddle - React, Tailwind, and code Playground
by alicemunro
CSS
svg {background: green}
JavaScript
var body = d3.select("body");
var svg = body.append("svg")
.attr("width", '100%')
.attr("height", '100%')
var outerG = svg.append("g")
.attr('id','outerG')
var innerG1 = outerG.append('g')
.attr('id','innerG1')
var innerG2 = outerG.append('g')
.attr('id','innerG2')
console.log(outerG[0][0].childNodes);