Kinetic.js

Kinetic.js

I am facing issue while trying to copy the data of a Kinetic object to a img variable in the same code

tried to use

var image

stage
.toDataURL({ callback: function(dataUrl) { kineticdataURL = dataUrl;
image
=dataURL.toDataURL;
 
or - - - Both dont work :(

image
=kineticdataURL; } }); window.open(image);


but got an empty screen,

need help..