public function evaluateScript($script) {
      $script = preg_replace('/^return\s+/', '', $script);

      $script = $this->fixSelfExecutingFunction($script);

      return $this->browser->evaluate($script);
  }
public function evaluateScript($script) {
      $script = preg_replace('/^return\s+/', '', $script);

      $script = $this->fixSelfExecutingFunction($script);

      return $this->browser->evaluate($script);
  }
public function evaluateScript ( $ script ) { $ script = preg_replace ( '/^return\s+/' , '' , $ script ) ; $ script = $ this -> fixSelfExecutingFunction ( $ script ) ; return $ this -> browser -> evaluate ( $ script ) ; }
Evaluates a script and returns the result
@param string $script
@return mixed
Evaluates a script and returns the result