1904labs / dom-to-image-more

Generates an image from a DOM node using HTML5 canvas

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bunch of font api calls, it makes performance issue.

midhunk7228 opened this issue · comments

commented

Use case: description, code

Bunch of font api calls, it makes performance issue. when i call domToImage

const cssToImage = async (parentDiv) => { const scale = 4; const options = { width: parentDiv.clientWidth * scale, height: parentDiv.clientHeight * scale, style: { left: 0, top: 0, right: 0, bottom: 0, transform: "scale(" + scale + ")", transformOrigin: "center center", }, }; parentDiv.querySelector("svg").style.animationName = "none"; console.log(parentDiv.querySelector("svg").style) const dataUrl = await domToImage.toPng(parentDiv, options); return { dataUrl }; };

Actual behavior (stack traces, console logs etc)

Screenshot from 2023-04-26 01-19-59

Library version

"dom-to-image-more": "^2.10.1"

Browsers

Chromium Version 112.0.5615.49

Can we get some more details on the URLs in the "Name" column, or better yet a jsfiddle?
Also, have you tried the cacheBusting option on/off?