demo/connections/third-party/qr/qr.js
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]);
    }
  }
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]);
    }
  }
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 ] ) ; } }
Override the `qr` API methods that require HTML5 canvas support to throw a relevant error.
Override the qr API methods that require HTML5 canvas support to throw a relevant error .