Commit 8752de4a 8752de4a1ecd0596eac0624beec9657282d8e0be by Tyler Ritchie

fixes #327 page.confirm handlers can return true or false

1 parent 73265252
......@@ -1988,7 +1988,8 @@ function createPage(casper) {
}
};
page.onConfirm = function onConfirm(message) {
return casper.filter('page.confirm', message) || true;
var listener_exists = typeof capser._filters['page.confirm'] !== 'undefined';
return listener_exists ? casper.filter('page.confirm', message) : true;
};
page.onConsoleMessage = function onConsoleMessage(msg) {
// client utils casper console message
......