Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 847
AppleGrew Avatar asked Apr 09 '11 15:04

AppleGrew


1 Answers

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)

like image 198
intuited Avatar answered Sep 22 '22 18:09

intuited