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