简体   繁体   中英

Replacement for jsdom in Node.js

Update

Node.js 4 is out now and it's fully supported by jsdom. The original question below is about Node.js 0.12.

If you keep getting weird messages like "jsdom 4.x onward only works on io.js, not Node.js", I recommend upgrading both Node.js and jsdom to the latest versions.


jsdom 4 has discontinued support for Node.js.

From the documentation :

Note that as of our 4.0.0 release, jsdom no longer works with Node.js™, and instead requires io.js. You are still welcome to install a release in the 3.x series if you are stuck on legacy technology like Node.js™.

(I've heard about the criticism around Joyent's management of Node.js, but the "legacy technology" here sounds a bit derogatory.)

While jsdom 3.1.2 still works fine, I would like to build new projects on a library that receives regular updates and supports Node.js. Is anybody aware of an alternative project that is still maintained by its authors?

Might not be the end all solution but cheerio does the trick on my end. Be sure to read through their guide on where they fall short of jsdom

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM