Why doesn't Node.js have a native DOM?

前端 未结 13 1632
既然无缘
既然无缘 2020-11-28 08:32

When I discovered that Node.js was built using the V8 JavaScript engine, I thought:

Great, web scraping will be easier as the page

13条回答
  •  自闭症患者
    2020-11-28 09:07

    If you read DOM as 'linked objects immediately accessible from my script' then the answer 'it does, but it's very different from set of objects available from web document script'. The main reason is that node is 'evented I/O for V8', not 'HTML tree objects for V8'

提交回复
热议问题