Migrate from jsdom to phantomJS ? (basic DOM creation)
问题 M. Bostock pointed out that nodejs' jsdom have incomplete support for svg, and, critical for me, doesn't support getBBox() . Also, he advised to switch to nodejs' PhantomJS. I checked out but the approach is new to me. My nodejs + jsdom script create a virtual DOM, with which my d3js plays and is as follow : var jsdom = require('jsdom'); jsdom.env( // creates virtual page "<html><body></body></html>", // create my DOM hook, [ 'http://d3js.org/d3.v3.min.js', // add my online dependencies ... '