code: function overrideAPI(qr) {
      var methods = [ 'canvas', 'image', 'save', 'saveSync', 'toDataURL' ];
      var i;
  
      function overrideMethod(name) {
        qr[name] = function () {
          throw new Error(name + ' requires HTML5 canvas element support');
        };
      }
  
      for (i = 0; i < methods.length; i++) {
        overrideMethod(methods[i]);
      }
    }
docs: Override the `qr` API methods that require HTML5 canvas support to throw a relevant error.