New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
page event listener fix #420
Conversation
what does this fix? |
it logs to the bash the page events like alert and error with |
The change to |
it was intentional and i understand this change how ever only the child process does this correct (as you mentioned). https://github.com/segmentio/nightmare/blob/master/lib/runner.js#L90-L92 the parent process doesn't listen to |
@antpaw Ah, I see. I must have misread the original diff. It looked like in passing it was adding the One nit: I think the page handler should handle variable arguments. Something like: this.child.on('page', function(){
log.apply(null, ['page'].concat(sliced(arguments)))
}); ... or if the this.child.on('page', function(){
log.apply(null, ['page-'+arguments[0]].concat(sliced(arguments,1)))
}); Re testing, the tests for ensuring |
+1 then i think we're good to go :-) |
page event listener fix
thanks! |
untested