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
a2420455
...
a2420455f2b06414b604654f11ee4c33c52d70aa
authored
2011-11-08 22:36:10 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
added away to change viewport
1 parent
74e81194
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
casper.js
casper.js
View file @
a242045
...
...
@@ -577,6 +577,12 @@
}
}
this
.
page
.
settings
=
mergeObjects
(
this
.
page
.
settings
,
this
.
options
.
pageSettings
);
if
(
typeof
this
.
options
.
clipRect
===
"object"
)
{
this
.
page
.
clipRect
=
this
.
options
.
clipRect
;
}
if
(
typeof
this
.
options
.
viewportSize
===
"object"
)
{
this
.
page
.
viewportSize
=
this
.
options
.
viewportSize
;
}
this
.
started
=
true
;
if
(
typeof
this
.
options
.
timeout
===
"number"
&&
this
.
options
.
timeout
>
0
)
{
self
.
log
(
"execution timeout set to "
+
this
.
options
.
timeout
+
'ms'
,
"info"
);
...
...
@@ -661,6 +667,17 @@
},
/**
* Changes the current viewport size.
*
* @param Object viewportSize An objet with two props: width and height
* @return Casper
*/
viewport
:
function
(
viewportSize
)
{
this
.
page
.
viewportSize
=
viewportSize
;
return
this
;
},
/**
* Adds a new step that will wait for a given amount of time (expressed
* in milliseconds) before processing an optional next one.
*
...
...
Please
register
or
sign in
to post a comment