B2G/gecko/testing/marionette/marionette-listener.js
/**
 * This function throws the visibility of the element error
 */
This function throws the visibility of the element error
This function throws the visibility of the element error
function checkVisible(el) {
  let visible = utils.isElementDisplayed(el);
  if (!visible) {
    return false;
  }
  if (el.tagName.toLowerCase() === 'body') {
    return true;
  }
  if (!elementInViewport(el)) {
    if (el.scrollIntoView) {
      el.scrollIntoView(true);
      if (!elementInViewport(el)) {
        return false;
      }
    }
    else {
      return false;
    }
  }
  return true;
}
function checkVisible ( el ) { let visible = utils . isElementDisplayed ( el ) ; if ( ! visible ) { return false ; } if ( el . tagName . toLowerCase ( ) === 'body' ) { return true ; } if ( ! elementInViewport ( el ) ) { if ( el . scrollIntoView ) { el . scrollIntoView ( true ) ; if ( ! elementInViewport ( el ) ) { return false ; } } else { return false ; } } return true ; }
This function throws the visibility of the element error
This function throws the visibility of the element error
//check if the element is visible //check if scroll function exist. If so, call it.