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
e13b9169
...
e13b91699bfa3f90077a0f9a4d00b8eaca1e3922
authored
2011-10-06 12:39:50 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added supplementary check for phantomjs version
1 parent
07c54ee5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
casper.js
casper.js
View file @
e13b916
...
...
@@ -579,7 +579,7 @@
*/
function
createPage
(
casper
)
{
var
page
;
if
(
phantom
.
version
.
major
<=
1
&&
phantom
.
version
.
minor
<
3
)
{
if
(
phantom
.
version
.
major
<=
1
&&
phantom
.
version
.
minor
<
3
&&
typeof
(
require
)
===
"function"
)
{
page
=
new
WebPage
();
}
else
{
page
=
require
(
'webpage'
).
create
();
...
...
@@ -642,7 +642,7 @@
if
(
!
what
||
typeof
(
what
)
!==
"object"
)
{
return
false
;
}
if
(
phantom
.
version
.
major
<=
1
&&
phantom
.
version
.
minor
<
3
)
{
if
(
phantom
.
version
.
major
<=
1
&&
phantom
.
version
.
minor
<
3
&&
typeof
(
require
)
===
"function"
)
{
return
what
instanceof
WebPage
;
}
else
{
return
what
.
toString
().
indexOf
(
'WebPage('
)
===
0
;
...
...
Please
register
or
sign in
to post a comment