I have defined this function:
function viewCanvasImg() {
//("stage" is a kineticjs stage class object)
stage.toDataURL({
callback: function(dataUrl) {
document.getElementById('prova').src=dataUrl;
window.open(dataUrl);
}
});
}
But when i call it by button it doesn't work. With shapes and draws all works fine but with images on canvas not.
SOLVED I noticed that the code didn't work only on local machine then i put on my webserver and all works fine.