use cheerio instead of jsdom

This commit is contained in:
John McLear 2014-11-25 17:26:09 +00:00
parent 97068b562d
commit 60d44cd3df
3 changed files with 11 additions and 10 deletions

View file

@ -54,10 +54,14 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
},
nodeNumChildren: function(n)
{
if(n.childNodes == null) return 0;
return n.childNodes.length;
},
nodeChild: function(n, i)
{
if(n.childNodes.item == null){
return n.childNodes[i];
}
return n.childNodes.item(i);
},
nodeProp: function(n, p)
@ -66,6 +70,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
},
nodeAttr: function(n, a)
{
if(n.getAttribute == null) return null;
return n.getAttribute(a);
},
optNodeInnerHTML: function(n)