Add comments
Showing
1 changed file
with
2 additions
and
0 deletions
... | @@ -925,11 +925,13 @@ Casper.prototype.getPageContent = function getPageContent() { | ... | @@ -925,11 +925,13 @@ Casper.prototype.getPageContent = function getPageContent() { |
925 | if (!head || !body) { | 925 | if (!head || !body) { |
926 | return null; | 926 | return null; |
927 | } | 927 | } |
928 | // for content in Webkit | ||
928 | if (head.childNodes.length === 0 && | 929 | if (head.childNodes.length === 0 && |
929 | body.childNodes.length === 1 && | 930 | body.childNodes.length === 1 && |
930 | __utils__.findOne('body pre[style]')) { | 931 | __utils__.findOne('body pre[style]')) { |
931 | return __utils__.findOne('body pre').textContent.trim(); | 932 | return __utils__.findOne('body pre').textContent.trim(); |
932 | } | 933 | } |
934 | // for content in Gecko | ||
933 | if (head.childNodes.length === 1 && | 935 | if (head.childNodes.length === 1 && |
934 | body.childNodes.length === 1 && | 936 | body.childNodes.length === 1 && |
935 | head.childNodes[0].localName === 'link' && | 937 | head.childNodes[0].localName === 'link' && | ... | ... |
-
Please register or sign in to post a comment