Merge pull request #929 from mickaelandrieu/bug-919-native-back
REFS #919 - Refactored casperJS.back() to use native phantomjs goBack()
Showing
1 changed file
with
2 additions
and
4 deletions
... | @@ -233,11 +233,9 @@ utils.inherits(Casper, events.EventEmitter); | ... | @@ -233,11 +233,9 @@ utils.inherits(Casper, events.EventEmitter); |
233 | Casper.prototype.back = function back() { | 233 | Casper.prototype.back = function back() { |
234 | "use strict"; | 234 | "use strict"; |
235 | this.checkStarted(); | 235 | this.checkStarted(); |
236 | return this.then(function _step() { | 236 | return this.then(function() { |
237 | this.emit('back'); | 237 | this.emit('back'); |
238 | this.evaluate(function _evaluate() { | 238 | this.page.goBack(); |
239 | history.back(); | ||
240 | }); | ||
241 | }); | 239 | }); |
242 | }; | 240 | }; |
243 | 241 | ... | ... |
-
Please register or sign in to post a comment