Name: node-webkit-screenshot
Owner: HubSpot
Description: Create screenshots using node-webkit
Created: 2015-10-20 14:41:11.0
Updated: 2017-07-12 13:54:00.0
Pushed: 2015-10-20 15:33:16.0
Homepage: null
Size: 103
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Create screenshots using node-webkit
install node-webkit-screenshot
fs = require('fs');
screenshot = require('node-webkit-screenshot');
enshot({
l : 'http://google.de',
dth : 1024,
ight : 768
n(function(buffer){
.writeFile('./out.png', buffer, function(){
// This will close the screenshot service
screenshot.close();
;
Type: number
Default: 3000
Specify custom port number for the webkit browser
Type: number
(seconds)
Default: 0
Delay capturing the screenshot.
Useful when the site does things after load that you want to capture.
Type: string
png|jpeg
Default: png
Specify the image type fot he screenshot
Type: int
Default: 0
Specify the with of the browser window
Type: int
Default: 0
Specify the height of the browser window
0.2.1
)Type: Object
Default: undefined
This will only work if generating png's. A crop object may look like this:
p : 10,
ft : 10,
dth : 100,
ight : 100
This will close the node-webkit
process. You have to call this function before node is able to exit.
If you would like to use this on travis or with a framebuffer like xvfb than you need to set the environment variable
NODESCREENSHOT_SHOW
to 1
. (export NODESCREENSHOT_SHOW
).
See this .travis.yml
for more information
0.3.1
0.3.0
close()
method.0.2.1
toolbar
for node-webkitcrop
option.0.2.0
0.1.0