X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fjcalderonzumba%2Fgastonjs%2Fsrc%2FBrowser%2FBrowserNavigateTrait.php;fp=vendor%2Fjcalderonzumba%2Fgastonjs%2Fsrc%2FBrowser%2FBrowserNavigateTrait.php;h=24189af77722b356c4bbf8518049de87128b6fe7;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/jcalderonzumba/gastonjs/src/Browser/BrowserNavigateTrait.php b/vendor/jcalderonzumba/gastonjs/src/Browser/BrowserNavigateTrait.php new file mode 100644 index 000000000..24189af77 --- /dev/null +++ b/vendor/jcalderonzumba/gastonjs/src/Browser/BrowserNavigateTrait.php @@ -0,0 +1,56 @@ +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'); + } +}