Closed jakedaleweb closed 1 year ago
Use fetch options https://github.com/qq15725/modern-screenshot/blob/v4.4.26/src/options.ts#L83
domToPng({
fetch: {
// see https://developer.mozilla.org/en-US/docs/Web/API/fetch
requestInit: {
mode: 'cors',
}
}
})
Default fetch options https://github.com/qq15725/modern-screenshot/blob/v4.4.26/src/get-default-request-init.ts
When creating a PNG from the dom where a cross-origin image is in-use, am I able to bypass CORS so that the image renders?
For example in html2canvas I can set
useCors
(html2canvas(screenshotTarget, {useCORS: true})
) - is there an equivalent in this library?