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
9fc8d80e
...
9fc8d80e95326a878bc08c20c56eb3ea3f4e74e0
authored
2012-04-26 18:34:31 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
page.initialized event now use native phantomjs onInitialized event
1 parent
3fe2d985
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
CHANGELOG.md
modules/casper.js
CHANGELOG.md
View file @
9fc8d80
...
...
@@ -4,6 +4,7 @@ CasperJS Changelog
2012-XX-XX, v0.6.6
------------------
-
**BC BREAK:**
: moved the
`page.initialized`
event to where it should have always been, and is now using native phantomjs
`onInitialized`
event
-
fixed
[
#95
](
https://github.com/n1k0/casperjs/issues/95
)
-
`Tester.assertSelectorExists`
was broken
2012-03-28, v0.6.5
...
...
modules/casper.js
View file @
9fc8d80
...
...
@@ -890,11 +890,6 @@ Casper.prototype.start = function start(location, then) {
}
},
this
.
options
.
timeout
,
this
);
}
this
.
emit
(
'page.initialized'
,
this
);
if
(
utils
.
isFunction
(
this
.
options
.
onPageInitialized
))
{
this
.
log
(
"Post-configuring WebPage instance"
,
"debug"
);
this
.
options
.
onPageInitialized
.
call
(
this
,
this
.
page
);
}
if
(
utils
.
isString
(
location
)
&&
location
.
length
>
0
)
{
return
this
.
thenOpen
(
location
,
utils
.
isFunction
(
then
)
?
then
:
this
.
createStep
(
function
(
self
)
{
self
.
log
(
"start page is loaded"
,
"debug"
);
...
...
@@ -1256,6 +1251,13 @@ function createPage(casper) {
casper
.
log
(
msg
,
level
,
"remote"
);
casper
.
emit
(
'remote.message'
,
msg
);
};
page
.
onInitialized
=
function
()
{
casper
.
emit
(
'page.initialized'
,
this
);
if
(
utils
.
isFunction
(
casper
.
options
.
onPageInitialized
))
{
this
.
log
(
"Post-configuring WebPage instance"
,
"debug"
);
casper
.
options
.
onPageInitialized
.
call
(
casper
,
page
);
}
};
page
.
onLoadStarted
=
function
()
{
casper
.
loadInProgress
=
true
;
casper
.
resources
=
[];
...
...
Please
register
or
sign in
to post a comment