0db7f07acc22e50a2be5dae3d0aa0904ad9b2ba0
[yaffs-website] / vendor / jcalderonzumba / gastonjs / src / Browser / BrowserConfigurationTrait.php
1 <?php
2
3 namespace Zumba\GastonJS\Browser;
4
5
6 /**
7  * Trait BrowserConfigurationTrait
8  * @package Zumba\GastonJS\Browser
9  */
10 trait BrowserConfigurationTrait {
11   /**
12    * Set whether to fail or not on javascript errors found on the page
13    * @param bool $enabled
14    * @return bool
15    */
16   public function jsErrors($enabled = true) {
17     return $this->command('set_js_errors', $enabled);
18   }
19
20   /**
21    * Set a blacklist of urls that we are not supposed to load
22    * @param array $blackList
23    * @return bool
24    */
25   public function urlBlacklist($blackList) {
26     return $this->command('set_url_blacklist', $blackList);
27   }
28
29   /**
30    * Set the debug mode on the browser
31    * @param bool $enable
32    * @return bool
33    */
34   public function debug($enable = false) {
35     $this->debug = $enable;
36     return $this->command('set_debug', $this->debug);
37   }
38
39 }