B2G/gecko/browser/components/places/content/controller.js
/**
   * Shows the Add Bookmark UI for the current insertion point.
   *
   * @param aType
   *        the type of the new item (bookmark/livemark/folder)
   */
Shows the Add Bookmark UI for the current insertion point.
@param aType
the type of the new item (bookmark/livemark/folder)
Shows the Add Bookmark UI for the current insertion point . @param aType the type of the new item ( bookmark / livemark / folder )
function PC_newItem(aType) {
    let ip = this._view.insertionPoint;
    if (!ip)
      throw Cr.NS_ERROR_NOT_AVAILABLE;
    let performed =
      PlacesUIUtils.showBookmarkDialog({ action: "add"
                                       , type: aType
                                       , defaultInsertionPoint: ip
                                       , hiddenRows: [ "folderPicker" ]
                                       }, window.top);
    if (performed) {
      let insertedNodeId = PlacesUtils.bookmarks
                                      .getIdForItemAt(ip.itemId, ip.index);
      this._view.selectItems([insertedNodeId], false);
    }
  }
function PC_newItem ( aType ) { let ip = this . _view . insertionPoint ; if ( ! ip ) throw Cr . NS_ERROR_NOT_AVAILABLE ; let performed = PlacesUIUtils . showBookmarkDialog ( { action : "add" , type : aType , defaultInsertionPoint : ip , hiddenRows : [ "folderPicker" ] } , window . top ) ; if ( performed ) { let insertedNodeId = PlacesUtils . bookmarks . getIdForItemAt ( ip . itemId , ip . index ) ; this . _view . selectItems ( [ insertedNodeId ] , false ) ; } }
Shows the Add Bookmark UI for the current insertion point.
Shows the Add Bookmark UI for the current insertion point .
// Select the new item.