refs #401, #402 - fixed page.resource.requested args
Showing
2 changed files
with
3 additions
and
3 deletions
... | @@ -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) { | ... | ... |
-
Please register or sign in to post a comment