Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
b44b82e3
...
b44b82e3f91ced8d565b65b308b2497ec8e74c38
authored
2013-05-08 23:06:43 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refs #401, #402 - fixed page.resource.requested args
1 parent
bd282b7f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
modules/casper.js
tests/suites/casper/request.js
modules/casper.js
View file @
b44b82e
...
...
@@ -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'
,
request
Data
,
request
);
}
if
(
utils
.
isFunction
(
casper
.
options
.
onResourceRequested
))
{
casper
.
options
.
onResourceRequested
.
call
(
casper
,
casper
,
requestData
,
request
);
...
...
tests/suites/casper/request.js
View file @
b44b82e
...
...
@@ -2,8 +2,8 @@
/*jshint strict:false*/
var
currentRequest
;
function
onResourceRequested
(
request
)
{
currentRequest
=
request
;
function
onResourceRequested
(
request
Data
,
request
)
{
currentRequest
=
request
Data
;
}
function
testHeader
(
header
)
{
...
...
Please
register
or
sign in
to post a comment