B2G/gecko/browser/components/places/tests/browser/browser_views_liveupdate.js
/**
 * Search an item id in a view.
 *
 * @param aItemId
 *        item id of the item to search.
 * @param aView
 *        either "toolbar", "menu" or "sidebar"
 * @param aValidator
 *        function to check validity of the found node element.
 * @returns [node, index, valid] or [null, null, false] if not found.
 */
Search an item id in a view.
@param aItemId
item id of the item to search.
Search an item id in a view . @param aItemId item id of the item to search .
function searchItemInView(aItemId, aView, aValidator) {
  switch (aView) {
  case "toolbar":
    return getNodeForToolbarItem(aItemId, aValidator);
  case "menu":
    return getNodeForMenuItem(aItemId, aValidator);
  case "sidebar":
    return getNodeForSidebarItem(aItemId, aValidator);
  }
  return [null, null, false];
}
function searchItemInView ( aItemId , aView , aValidator ) { switch ( aView ) { case "toolbar" : return getNodeForToolbarItem ( aItemId , aValidator ) ; case "menu" : return getNodeForMenuItem ( aItemId , aValidator ) ; case "sidebar" : return getNodeForSidebarItem ( aItemId , aValidator ) ; } return [ null , null , false ] ; }
Search an item id in a view.
Search an item id in a view .