B2G/gecko/browser/components/tabview/iq.js
// Unbinds the given function from the given event type.
Unbinds the given function from the given event type.
Unbinds the given function from the given event type .
function iQClass_unbind(type, func) {
    Utils.assert(typeof func == "function", 'Must provide a function');
    for (let i = 0; this[i] != null; i++) {
      let elem = this[i];
      let handler = func;
      if (elem.iQEventData && elem.iQEventData[type]) {
        let count = elem.iQEventData[type].length;
        for (let a = 0; a < count; a++) {
          let pair = elem.iQEventData[type][a];
          if (pair.original == func) {
            handler = pair.modified;
            elem.iQEventData[type].splice(a, 1);
            if (!elem.iQEventData[type].length) {
              delete elem.iQEventData[type];
              if (!Object.keys(elem.iQEventData).length)
                delete elem.iQEventData;
            }
            break;
          }
        }
      }
      elem.removeEventListener(type, handler, false);
    }
    return this;
  }
function iQClass_unbind ( type , func ) { Utils . assert ( typeof func == "function" , 'Must provide a function' ) ; for ( let i = 0 ; this [ i ] != null ; i ++ ) { let elem = this [ i ] ; let handler = func ; if ( elem . iQEventData && elem . iQEventData [ type ] ) { let count = elem . iQEventData [ type ] . length ; for ( let a = 0 ; a < count ; a ++ ) { let pair = elem . iQEventData [ type ] [ a ] ; if ( pair . original == func ) { handler = pair . modified ; elem . iQEventData [ type ] . splice ( a , 1 ) ; if ( ! elem . iQEventData [ type ] . length ) { delete elem . iQEventData [ type ] ; if ( ! Object . keys ( elem . iQEventData ) . length ) delete elem . iQEventData ; } break ; } } } elem . removeEventListener ( type , handler , false ) ; } return this ; }
Unbinds the given function from the given event type.
Unbinds the given function from the given event type .