B2G/gecko/browser/devtools/responsivedesign/responsivedesign.jsm
/**
   * Set the menuitem label of a preset.
   *
   * @param aMenuitem menuitem to edit.
   * @param aPreset associated preset.
   */
Set the menuitem label of a preset.
@param aMenuitem menuitem to edit.
@param aPreset associated preset.
Set the menuitem label of a preset . @param aMenuitem menuitem to edit . @param aPreset associated preset .
function RUI_setMenuLabel(aMenuitem, aPreset) {
    let size = Math.round(aPreset.width) + "x" + Math.round(aPreset.height);
    if (aPreset.custom) {
      let str = this.strings.formatStringFromName("responsiveUI.customResolution", [size], 1);
      aMenuitem.setAttribute("label", str);
    } else if (aPreset.name != null && aPreset.name !== "") {
      let str = this.strings.formatStringFromName("responsiveUI.namedResolution", [size, aPreset.name], 2);
      aMenuitem.setAttribute("label", str);
    } else {
      aMenuitem.setAttribute("label", size);
    }
  }
function RUI_setMenuLabel ( aMenuitem , aPreset ) { let size = Math . round ( aPreset . width ) + "x" + Math . round ( aPreset . height ) ; if ( aPreset . custom ) { let str = this . strings . formatStringFromName ( "responsiveUI.customResolution" , [ size ] , 1 ) ; aMenuitem . setAttribute ( "label" , str ) ; } else if ( aPreset . name != null && aPreset . name !== "" ) { let str = this . strings . formatStringFromName ( "responsiveUI.namedResolution" , [ size , aPreset . name ] , 2 ) ; aMenuitem . setAttribute ( "label" , str ) ; } else { aMenuitem . setAttribute ( "label" , size ) ; } }
Set the menuitem label of a preset.
Set the menuitem label of a preset .