B2G/gecko/browser/devtools/responsivedesign/responsivedesign.jsm
/**
   * Build the presets list and append it to the menupopup.
   *
   * @param aParent menupopup.
   */
Build the presets list and append it to the menupopup.
@param aParent menupopup.
Build the presets list and append it to the menupopup . @param aParent menupopup .
function RUI_registerPresets(aParent) {
    let fragment = this.chromeDoc.createDocumentFragment();
    let doc = this.chromeDoc;
    for (let preset of this.presets) {
      let menuitem = doc.createElement("menuitem");
      menuitem.setAttribute("ispreset", true);
      this.menuitems.set(menuitem, preset);
      if (preset.key === this.currentPresetKey) {
        menuitem.setAttribute("selected", "true");
        this.selectedItem = menuitem;
      }
      if (preset.custom)
        this.customMenuitem = menuitem;
      this.setMenuLabel(menuitem, preset);
      fragment.appendChild(menuitem);
    }
    aParent.appendChild(fragment);
  }
function RUI_registerPresets ( aParent ) { let fragment = this . chromeDoc . createDocumentFragment ( ) ; let doc = this . chromeDoc ; for ( let preset of this . presets ) { let menuitem = doc . createElement ( "menuitem" ) ; menuitem . setAttribute ( "ispreset" , true ) ; this . menuitems . set ( menuitem , preset ) ; if ( preset . key === this . currentPresetKey ) { menuitem . setAttribute ( "selected" , "true" ) ; this . selectedItem = menuitem ; } if ( preset . custom ) this . customMenuitem = menuitem ; this . setMenuLabel ( menuitem , preset ) ; fragment . appendChild ( menuitem ) ; } aParent . appendChild ( fragment ) ; }
Build the presets list and append it to the menupopup.
Build the presets list and append it to the menupopup .