Commit b44b82e3 b44b82e3f91ced8d565b65b308b2497ec8e74c38 by Nicolas Perriault

refs #401, #402 - fixed page.resource.requested args

1 parent bd282b7f
...@@ -2408,7 +2408,7 @@ function createPage(casper) { ...@@ -2408,7 +2408,7 @@ function createPage(casper) {
2408 page.onResourceRequested = function onResourceRequested(requestData, request) { 2408 page.onResourceRequested = function onResourceRequested(requestData, request) {
2409 casper.emit('resource.requested', requestData, request); 2409 casper.emit('resource.requested', requestData, request);
2410 if (requestData.url === casper.requestUrl) { 2410 if (requestData.url === casper.requestUrl) {
2411 casper.emit('page.resource.requested', request); 2411 casper.emit('page.resource.requested', requestData, request);
2412 } 2412 }
2413 if (utils.isFunction(casper.options.onResourceRequested)) { 2413 if (utils.isFunction(casper.options.onResourceRequested)) {
2414 casper.options.onResourceRequested.call(casper, casper, requestData, request); 2414 casper.options.onResourceRequested.call(casper, casper, requestData, request);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
2 /*jshint strict:false*/ 2 /*jshint strict:false*/
3 var currentRequest; 3 var currentRequest;
4 4
5 function onResourceRequested(request) { 5 function onResourceRequested(requestData, request) {
6 currentRequest = request; 6 currentRequest = requestData;
7 } 7 }
8 8
9 function testHeader(header) { 9 function testHeader(header) {
......