Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser crashes when using toPng #159

Open
Avence1 opened this issue Dec 7, 2023 · 0 comments
Open

Browser crashes when using toPng #159

Avence1 opened this issue Dec 7, 2023 · 0 comments

Comments

@Avence1
Copy link

Avence1 commented Dec 7, 2023

import domtoimage from 'dom-to-image-more';

const img = document.querySelector('#PREVIEW_DOM_ID');

const config = {
  width:296,
  height:80,
  bgcolor: 'transparent',
  imagePlaceholder: 'fail',
  cacheBust: false,
  style: {
     transformOrigin: 'top left',
     transform: `scale(${window.devicePixelRatio})`,
     width: '296px',
     height: '80px',
  },
};

domtoimage.toPng(img,config).then(url=>...)

Browser crashed when calling toPng function

Library version

3.2.0

Browsers

Chrome 90.0.4430.72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant