What are the different ways to save a canvas object?
In my research, I've found two approaches:
var data = canvas.toDataURL();
var prev = window.location.href;
window.location.href = data.replace("image/png", "image/octet-stream");
window.location.href = prev;
Another way is to take a snapshot.
Are there other ways to do this?
Is it possible to customize the download filename?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…