MatthewMueller/cheerio — pull request #424 by nleush (2014-03-25 12:57:44+00:00)
Title: Allow load cheerio using existing domhandler (not only string)

I need to load cheerio from existing dom to prevent parsing same content second time after it was loaded from web. Example usage:

var cheerio = require('cheerio');
var DomHandler = htmlparser2.DomHandler;
var domHandler = new DomHandler(function(error, dom) {
var $ = cheerio.load(dom)
});
// ... load dom
This is used in cheerio parser plugin in iframely: https://github.com/itteco/iframely/blob/develop/lib/plugins/system/cheerio.js