title: D3js: finding path's bounding box (without getBBox() )?
body: <p>The following code works on Chromium  :</p>
  
  <pre><code>var node = window.d3.selectAll('#L1 &gt; *:nth-child(2)');
  var bbox = node.node().getBBox();
  console.log(bbox) // {height: 44, width: 44, y: -13, x: 144}
  </code></pre>
  
  <p>but not with nodejs + jsdom:</p>
  
  <pre><code>"TypeError: Object [ PATH ] has no method 'getBBox' "
  </code></pre>
  
  <p>M. Bostock pointed out that JSDOM <a href="https://groups.google.com/d/msg/d3-js/JyldAkWkTvI/n8thanJeGvAJ" rel="nofollow noreferrer">doesn't support</a> <code>getBBox()</code></p>
  
  <p><strong>What D3js replacement to use to get the bounding box of <code>#L1 &gt; *:nth-child(2)</code> ?</strong></p>
  
  <p>Past efforts lead me there : <code>getBBox()</code> based <a href="http://jsfiddle.net/99dex43s/28/" rel="nofollow noreferrer"><strong>fiddle</strong></a></p>
  
  <p><img src="https://i.stack.imgur.com/c8yFy.png" alt="enter image description here"></p>