src/srcset.js
/**
   * Reconstructs the string expression for this srcset.
   * @return {string}
   */
Reconstructs the string expression for this srcset.
@return {string}
Reconstructs the string expression for this srcset . @return { string }
stringify() {
    const res = [];
    for (let i = 0; i < this.sources_.length; i++) {
      const source = this.sources_[i];
      if (source.width) {
        res.push(`${source.url} ${source.width}w`);
      } else if (source.dpr) {
        res.push(`${source.url} ${source.dpr}x`);
      } else {
        res.push(`${source.url}`);
      }
    }
    return res.join(', ');
  }
stringify ( ) { const res = [ ] ; for ( let i = 0 ; i < this . sources_ . length ; i ++ ) { const source = this . sources_ [ i ] ; if ( source . width ) { res . push ( ` ${ source . url } ${ source . width } ` ) ; } else if ( source . dpr ) { res . push ( ` ${ source . url } ${ source . dpr } ` ) ; } else { res . push ( ` ${ source . url } ` ) ; } } return res . join ( ', ' ) ; }
Reconstructs the string expression for this srcset.
Reconstructs the string expression for this srcset .