What is the difference between jsdom.env() and jsdom.jsdom?

雨燕双飞 提交于 2020-01-02 04:29:11

问题


I am still foggy about how to used jsdom. What is the difference between jsdom.env() and jsdom.jsdom?


回答1:


The readme file explains that

jsdom.env is built for ease of use, which is rare in the world of the DOM! Since the web has some absolutely horrible javascript on it, as of jsdom 0.2.0 jsdom.env will not process external resources (scripts, images, etc). If you want to process the javascript use one of the methods below (jsdom.jsdom or jsdom.jQueryify)



来源:https://stackoverflow.com/questions/5605961/what-is-the-difference-between-jsdom-env-and-jsdom-jsdom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!