Commit b44b82e3 b44b82e3f91ced8d565b65b308b2497ec8e74c38 by Nicolas Perriault

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

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