Show page errors only in verbose mode

Phantom sent page errors to stdout, becuse no handler assigned.
I add page.onError handler, which use wappalyzer.log [debug] output
main
Dmitry Manannikov 10 years ago
parent 352de1ba67
commit d2ba9b07fe

@ -93,6 +93,9 @@
page.onConsoleMessage = function(message) { page.onConsoleMessage = function(message) {
wappalyzer.log(message); wappalyzer.log(message);
}; };
page.onError = function(message) {
wappalyzer.log('Page error: ' + message);
};
page.onResourceReceived = function(response) { page.onResourceReceived = function(response) {
if ( response.url.replace(/\/$/, '') === url.replace(/\/$/, '') ) { if ( response.url.replace(/\/$/, '') === url.replace(/\/$/, '') ) {