I checked this same code in Firefox and it works perfectly. In fact, this worked in Chrome a few weeks back, but now I'm just getting a blank screen.
The code is below:
The function triggers on button click.
function saving() {
var saveURL = canvas.toDataURL();
window.open(saveURL, "_blank", "location=0, menubar=0");
}