Why doesn't Node.js have a native DOM?
问题 When I discovered that Node.js was built using the V8 JavaScript engine , I thought: Great, web scraping will be easier as the page will be rendered like in the browser, with a \"native\" DOM supporting XPath and any AJAX calls on the page executed. Why doesn\'t it have a native DOM when it uses the same JavaScript engine as Chrome? Why doesn\'t it have a mode to run JavaScript in retrieved pages? What am I not understanding about JavaScript engines vs the engine in a web browser? Many thanks