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