title: Save fabricjs canvas as image on the pc
body: <p>I want to save the Fabric canvas as an image (jpg or png is the same) on the pc, by clicking on a button in my html page. I tried a solution but doesn't work:</p>
  
  <pre><code>function saveF(canvF) {
  var imageCanv = canvF.toDataURL('png');
  var myBlob = new Blob(['imageCanv'], { type: "image/png" });
  var reader = new FileReader();
  reader.onload = function (event) {
      var URL = canvF.toDataURL('png');
      document.getElementById("lnkDownload").href = URL;
  };
  
  reader.readAsDataURL(myBlob);}
  </code></pre>
  
  <p>This is the html tag :</p>
  
  <pre><code>&lt;a class="icon fb" href="" id="lnkDownload" download="canvas.png" style="float:left; background-color:red"&gt;&lt;i class="fa fa-save"&gt;&lt;/i&gt;&lt;/a&gt;
  </code></pre>
  
  <p>i founded other solutions but they didn't work</p>