@ohpyupi/screenshotjs

1.0.5 • Public • Published

ScreenshotJS

The module helps to take a screenshot in browsers.

Demo

Screenshot Demo Gif

Installation

npm install html2canvas @ohpyupi/screenshotjs -S

Methods

capture(options) -> void

Allows users to select an area to be screenshotted.

Parameters

Name Type Description
options.onComplete (dataUrl) => void A callback called when the area of screenshot is selected.

download(dataUrl, filename) -> void

Downloads an image dataUrl to the local drive.

Parameters

Name Type Description
dataUrl string Image data in data url format
filename string The filename of image data

License

MIT

Package Sidebar

Install

npm i @ohpyupi/screenshotjs

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

5.34 kB

Total Files

5

Last publish

Collaborators

  • ohpyupi