fixes #327 page.confirm handlers can return true or false
Showing
1 changed file
with
2 additions
and
1 deletions
... | @@ -1988,7 +1988,8 @@ function createPage(casper) { | ... | @@ -1988,7 +1988,8 @@ function createPage(casper) { |
1988 | } | 1988 | } |
1989 | }; | 1989 | }; |
1990 | page.onConfirm = function onConfirm(message) { | 1990 | page.onConfirm = function onConfirm(message) { |
1991 | return casper.filter('page.confirm', message) || true; | 1991 | var listener_exists = typeof capser._filters['page.confirm'] !== 'undefined'; |
1992 | return listener_exists ? casper.filter('page.confirm', message) : true; | ||
1992 | }; | 1993 | }; |
1993 | page.onConsoleMessage = function onConsoleMessage(msg) { | 1994 | page.onConsoleMessage = function onConsoleMessage(msg) { |
1994 | // client utils casper console message | 1995 | // client utils casper console message | ... | ... |
-
Please register or sign in to post a comment