qq15725 / modern-screenshot

📸 Quickly generate image from DOM node using HTML5 canvas and SVG
https://www.toolpkg.com/image/html-to-image
MIT License
457 stars 32 forks source link

no-cors mode errors despite 200 response #67

Open markchoward7 opened 7 months ago

markchoward7 commented 7 months ago

When setting no-cors like so:

const data = await domToPng(element.current, {
  fetch: {
    requestInit: { mode: "no-cors" },
  },
});

Any image requests fail with Failed fetch, not 2xx response. However, looking at the network tab shows 200 responses for all image requests.

Sandbox: https://codesandbox.io/p/sandbox/modern-screenshot-forked-rhgctx?file=%2Findex.html%3A26%2C52

image

lxzemor commented 4 months ago

I also have the same problem,How to solve it?

mlsalcedo commented 2 months ago

facing same issue, How to solve it?