B2G/gecko/browser/components/places/src/PlacesUIUtils.jsm
/**
   * Gets a transaction for copying a live bookmark item from one container to
   * another.
   *
   * @param   aData
   *          Unwrapped live bookmarkmark data
   * @param   aContainer
   *          The container we are copying into
   * @param   aIndex
   *          The index in the destination container to insert the new items
   * @return A nsITransaction object that will perform the copy.
   *
   * @note Since a copy creates a completely new item, only some internal
   *       annotations are synced from the old one.
   * @see this._copyableAnnotations for the list of copyable annotations.
   */
Gets a transaction for copying a live bookmark item from one container to
another.

@param   aData
Unwrapped live bookmarkmark data
@param   aContainer
The container we are copying into
@param   aIndex
The index in the destination container to insert the new items
@return A nsITransaction object that will perform the copy.

@note Since a copy creates a completely new item, only some internal
annotations are synced from the old one.
@see this._copyableAnnotations for the list of copyable annotations.
Gets a transaction for copying a live bookmark item from one container to another . @param aData Unwrapped live bookmarkmark data @param aContainer The container we are copying into @param aIndex The index in the destination container to insert the new items @return A nsITransaction object that will perform the copy . @note Since a copy creates a completely new item only some internal annotations are synced from the old one . @see this . _copyableAnnotations for the list of copyable annotations .
function PUIU__getLivemarkCopyTransaction(aData, aContainer, aIndex)
  {
    if (!aData.livemark || !aData.annos) {
      throw new Error("node is not a livemark");
    }
    let feedURI, siteURI;
    let annos = [];
    if (aData.annos) {
      annos = aData.annos.filter(function (aAnno) {
        if (aAnno.name == PlacesUtils.LMANNO_FEEDURI) {
          feedURI = PlacesUtils._uri(aAnno.value);
        }
        else if (aAnno.name == PlacesUtils.LMANNO_SITEURI) {
          siteURI = PlacesUtils._uri(aAnno.value);
        }
        return this._copyableAnnotations.indexOf(aAnno.name) != -1
      }, this);
    }
    return new PlacesCreateLivemarkTransaction(feedURI, siteURI, aData.title,
                                               aContainer, aIndex, annos);
  }
function PUIU__getLivemarkCopyTransaction ( aData , aContainer , aIndex ) { if ( ! aData . livemark || ! aData . annos ) { throw new Error ( "node is not a livemark" ) ; } let feedURI , siteURI ; let annos = [ ] ; if ( aData . annos ) { annos = aData . annos . filter ( function ( aAnno ) { if ( aAnno . name == PlacesUtils . LMANNO_FEEDURI ) { feedURI = PlacesUtils . _uri ( aAnno . value ) ; } else if ( aAnno . name == PlacesUtils . LMANNO_SITEURI ) { siteURI = PlacesUtils . _uri ( aAnno . value ) ; } return this . _copyableAnnotations . indexOf ( aAnno . name ) != - 1 } , this ) ; } return new PlacesCreateLivemarkTransaction ( feedURI , siteURI , aData . title , aContainer , aIndex , annos ) ; }
Gets a transaction for copying a live bookmark item from one container to
 another.
Gets a transaction for copying a live bookmark item from one container to another .