code: function download(cvs, data, callback) {
      var mime = data.mime || DEFAULT_MIME;
  
      root.location.href = cvs.toDataURL(mime).replace(mime, DOWNLOAD_MIME);
  
      if (typeof callback === 'function') callback();
    }
docs: Force the canvas image to be downloaded in the browser. Optionally, a `callback` function can be specified which will be called upon completed. Since this is not an asynchronous operation, this is merely convenient and helps simplify the calling code.