How to use the takeScreenshot function from bindings

Find comprehensive JavaScript bindings.takeScreenshot code examples handpicked from public code repositorys.

72
73
74
75
76
77
78
79
80
81

// Use screen dimensions if not resolved
if (!width) width = screenWidth;
if (!height) height = screenHeight;

const result = addon.takeScreenshot(encoder, filenameAbsolute, quality, width, height);
if (result !== 0) {
	throw(new Error(errorCodes.get(result) || unknownError));
}
return {
fork icon0
star icon1
watch icon0

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)