Access to image at from origin 'https://fiddle.jshell.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
const c = document.getElementById("myCanvas");
//window.addEventListener("load", () => {
const ctx = c.getContext("2d");
const img = document.getElementById("scream");
img.onload = function() {
ctx.drawImage(img, 0, 0);
c.toBlob(function (blob) {
console.log( URL.createObjectURL(blob)) // ссылка на урезанное изображение
}, 'image/jpg');
}
// ctx.drawImage(img, 0, 0);
// });
<div>
<span>
Hello
</span>
</div>
realFetch(url {
method: 'POST',
mode: 'no-cors',
cache: 'no-cache',
credentials: "same-origin",
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(dataUser)
}).json()
export DJANGO=http://55.55.55.123/
webpack-dev-server --open
console.log(process.env.DJANGO);
export DJANGO=http://55.55.55.123/