cheerio
cheerio copied to clipboard
Stringify behaviour differs between cheerio and jQuery
jQuery fragment html()
:
$("<html></html>").html()
//-> ""
cheerio fragment html()
:
const $ = cheerio.load("")
$("<html></html>").html()
//-> <html><head></head><body></body></html>
jQuery toString()
:
$(":root").toString()
//-> [object Object]
cheerio toString()
:
const $ = cheerio.load("")
$(":root").toString()
//-> <html><head></head><body></body></html>
@inikulin @fb55
@fb55 @inikulin this could use the label jQuery Differences https://github.com/cheeriojs/cheerio/issues?q=is%3Aopen+is%3Aissue+label%3A%22jQuery+Differences%22
Thanks @jcrben!