B2G/gecko/browser/components/tabview/iq.js
// elements that match the given selector.
elements that match the given selector.
elements that match the given selector .
function iQClass_find(selector) {
    let ret = [];
    let length = 0;
    let l = this.length;
    for (let i = 0; i < l; i++) {
      length = ret.length;
      try {
        Utils.merge(ret, this[i].querySelectorAll(selector));
      } catch(e) {
        Utils.log('iQ.find error (bad selector)', e);
      }
      if (i > 0) {
        for (let n = length; n < ret.length; n++) {
          for (let r = 0; r < length; r++) {
            if (ret[r] === ret[n]) {
              ret.splice(n--, 1);
              break;
            }
          }
        }
      }
    }
    return iQ(ret);
  }
function iQClass_find ( selector ) { let ret = [ ] ; let length = 0 ; let l = this . length ; for ( let i = 0 ; i < l ; i ++ ) { length = ret . length ; try { Utils . merge ( ret , this [ i ] . querySelectorAll ( selector ) ) ; } catch ( e ) { Utils . log ( 'iQ.find error (bad selector)' , e ) ; } if ( i > 0 ) { for ( let n = length ; n < ret . length ; n ++ ) { for ( let r = 0 ; r < length ; r ++ ) { if ( ret [ r ] === ret [ n ] ) { ret . splice ( n -- , 1 ) ; break ; } } } } } return iQ ( ret ) ; }
elements that match the given selector.
elements that match the given selector .
// Make sure that the results are unique