Commit f04ed9f6 f04ed9f625aa41058062ce7a81a32cfaced9109d by Nicolas Perriault

fixed `page.initialized` event didn't get the initialized `WebPage` instance

1 parent 5ec02c91
......@@ -4,6 +4,7 @@ CasperJS Changelog
XXXX-XX-XX, v1.0.0
------------------
- fixed `page.initialized` event didn't get the initialized `WebPage` instance
- fixed a bug preventing `Casper.options.onPageInitialized()` from being called
- fixed [#215](https://github.com/n1k0/casperjs/issues/215) - fixed broken `--fail-fast` option creating an endless loop on error
- fixed `Tester.renderFailureDetails()` which couldn't print failure details correctly in certain circumstances
......
......@@ -2014,7 +2014,7 @@ function createPage(casper) {
casper.emit('page.error', msg, trace);
};
page.onInitialized = function onInitialized() {
casper.emit('page.initialized', this);
casper.emit('page.initialized', page);
if (utils.isFunction(casper.options.onPageInitialized)) {
casper.log("Post-configuring WebPage instance", "debug");
casper.options.onPageInitialized.call(casper, page);
......