+ 2
How to fetch image data from image url , create blob and image url from it ? [solved]
I tried something but i get an error and i have no idea why is it happening . Any help is much appreciated! https://code.sololearn.com/WCkZpODec3BS/?ref=app
4 ответов
+ 4
Abhay
Write whole js code inside this function:
window.onload = function () {
}
+ 3
Declare img inside
.then(data=>{
let img=document.querySelector("img");
and yes
Abhay
Your HTML contens load before the JavaScript so you have to write JavaScript code inside the window.onload function so your Javascript code will execute after loading HTML contents.
window.onload = function () {
//Your code
}
+ 2
A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ tyvm :)! I thought it would take me hours to resolve and even then i wouldn't find a solution for it .
+ 1
HrCoder ty ! yes i know but i completely forgot about it since it is something that you don't need to worry about when using other ide.