code: function(data) {
        data = normalizeData(data);
  
        // `<canvas>` element only which the QR code is rendered.
        var cvs = this.canvas(data);
        // `<img>` element used to display the QR code.
        var img = data.image || createImage();
  
        // Apply the QR code to `img`.
        img.src    = cvs.toDataURL(data.mime || DEFAULT_MIME);
        img.height = cvs.height;
        img.width  = cvs.width;
  
        return img;
      }
docs: Generate the QR code using the data provided and render it on to a `<img>` element. If no `<img>` element is specified in the argument provided a new one will be created and used. ECC (error correction capacity) determines how many intential errors are contained in the QR code.