Commit 20b5c47d 20b5c47d6372a90afbcfb830a59f31cdb21550cf by Nicolas Perriault

reverted 83472789 (refs #34) and added a new clear() method to stop javascript ex…

…ecution within the remote DOM environment
1 parent 97550163
......@@ -4,6 +4,8 @@ CasperJS Changelog
XXXX-XX-XX, v0.6.5
------------------
- **BC BREAK:** reverted 8347278 (refs [#34](https://github.com/n1k0/casperjs/issues/34) and added a new `clear()` method to *close* a page
You now have to call `casper.clear()` if you want to stop javascript execution within the remote DOM environment.
- fixed 0.6.4 version number in `bootstrap.js`
- centralized version number to package.json
......
Subproject commit d0f987e0cf96a019e27201001ba158dbd7a899be
Subproject commit 844fb797822741455d62adcec743f93620b1827e
......
......@@ -213,7 +213,6 @@ Casper.prototype.checkStep = function checkStep(self, onComplete) {
} else {
self.result.time = new Date().getTime() - self.startTime;
self.log(f("Done %s steps in %dms", self.steps.length, self.result.time), "info");
self.page.content = ''; // avoid having previously loaded DOM contents being still active (refs #34)
clearInterval(self.checker);
self.emit('run.complete');
if (utils.isFunction(onComplete)) {
......@@ -230,6 +229,20 @@ Casper.prototype.checkStep = function checkStep(self, onComplete) {
};
/**
* Clears the current page execution environment context. Useful to avoid
* having previously loaded DOM contents being still active (refs #34).
*
* Think of it as a way to stop javascript execution within the remote DOM
* environment.
*
* @return Casper
*/
Casper.prototype.clear = function clear() {
this.page.content = '';
return this;
};
/**
* Emulates a click on the element from the provided selector using the mouse
* pointer, if possible.
*
......