B2G/gecko/browser/components/places/tests/browser/browser_library_search.js
/**
 * Clicks the given search scope button if it is enabled.
 *
 * @param  aScopeButtonId
 *         the button with this ID will be clicked
 * @return true if the button is enabled, false otherwise
 */
Clicks the given search scope button if it is enabled.
@param  aScopeButtonId
the button with this ID will be clicked
@return true if the button is enabled, false otherwise
Clicks the given search scope button if it is enabled . @param aScopeButtonId the button with this ID will be clicked @return true if the button is enabled false otherwise
function selectScope(aScopeButtonId) {
  let doc = gLibrary.document;
  let button = doc.getElementById(aScopeButtonId);
  isnot(button, null,
     "Sanity check: scope button with ID " + aScopeButtonId + " should exist");
  if (button.disabled || button.hidden)
    return false;
  button.click();
  return true;
}
function selectScope ( aScopeButtonId ) { let doc = gLibrary . document ; let button = doc . getElementById ( aScopeButtonId ) ; isnot ( button , null , "Sanity check: scope button with ID " + aScopeButtonId + " should exist" ) ; if ( button . disabled || button . hidden ) return false ; button . click ( ) ; return true ; }
Clicks the given search scope button if it is enabled.
Clicks the given search scope button if it is enabled .
// Bug 469436 may hide an inappropriate scope button instead of disabling it.