You are here

trait BrowserNavigateTrait in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/jcalderonzumba/gastonjs/src/Browser/BrowserNavigateTrait.php \Zumba\GastonJS\Browser\BrowserNavigateTrait

Trait BrowserNavigateTrait @package Zumba\GastonJS\Browser

Hierarchy

File

vendor/jcalderonzumba/gastonjs/src/Browser/BrowserNavigateTrait.php, line 11

Namespace

Zumba\GastonJS\Browser
View source
trait BrowserNavigateTrait {

  /**
   * Send a visit command to the browser
   * @param $url
   * @return mixed
   */
  public function visit($url) {
    return $this
      ->command('visit', $url);
  }

  /**
   * Gets the current url we are in
   * @return mixed
   */
  public function currentUrl() {
    return $this
      ->command('current_url');
  }

  /**
   * Goes back on the browser history if possible
   * @return bool
   * @throws BrowserError
   * @throws \Exception
   */
  public function goBack() {
    return $this
      ->command('go_back');
  }

  /**
   * Goes forward on the browser history if possible
   * @return mixed
   * @throws BrowserError
   * @throws \Exception
   */
  public function goForward() {
    return $this
      ->command('go_forward');
  }

  /**
   * Reloads the current page we are in
   */
  public function reload() {
    return $this
      ->command('reload');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BrowserNavigateTrait::currentUrl public function Gets the current url we are in
BrowserNavigateTrait::goBack public function Goes back on the browser history if possible
BrowserNavigateTrait::goForward public function Goes forward on the browser history if possible
BrowserNavigateTrait::reload public function Reloads the current page we are in
BrowserNavigateTrait::visit public function Send a visit command to the browser