1.0.2 • Published 9 months ago

@wfkit/elshot v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
9 months ago

@wfkit/elshot

Installation

pnpm i @wfkit/elshot

Usage

import { createElShot } from '@wfkit/elshot'

// defautl
const shot = createElShot({
  name: 'html-to-image',
})

// or html2canvas
const shot = createElShot({
  name: 'html2canvas',
})

// or modern-screenshot
const shot = createElShot({
  name: 'modern-screenshot',
})

// or custom
const shot = createElShot({
  name: '<provider name>',
  url: `<provider script url>`,
  toCanvas: (_el, _options) => {
    // ...
  },
})

// shot
await shot.toCanvas(el, options)

License

MIT © YDWF.COM

1.0.2

9 months ago

1.0.1

12 months ago

1.0.0

1 year ago