i want it to be able to go the url in the page and get the next url and so on till the drawing is complete
function linkedDrawing(canvas,url){
fetch(url)
.then((response)=> response.json())
.then((data)=>{
url = data.url;
alert(data.url);
const c = canvas.getContext('2d');
c.beginPath();
c.moveTo(data.x1, data.y1);
c.lineTo(data.x2, data.y2);
c.strokeStyle = data.col;
c.stroke();
})
}
}
linkedDrawing(linkedDrawingCanvas, "http://jacek.soc.port.ac.uk/tmp/ws/alpha.json")
my fiddle: http://jsfiddle.net/g1nqkn7h/3/