Skip to content

Commit

Permalink
fix: add support for innerHTML (fixes #19)
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Oct 31, 2017
1 parent b43daf7 commit 82824dc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/evaluators/cheerioEvaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export default (): EvaluatorType => {
return node.clone().wrap('<div>').parent().html();
}

// @see https://github.com/cheeriojs/cheerio/issues/1099
if (name === 'innerHTML') {
return node.html();
}

// @see https://github.com/cheeriojs/cheerio/issues/993
if (name === 'childNodes') {
return node[0].childNodes;
Expand Down

0 comments on commit 82824dc

Please sign in to comment.