| @@ 847-857 (lines=11) @@ | ||
| 844 | * |
|
| 845 | * @return \Jaxon\Plugin\Response |
|
| 846 | */ |
|
| 847 | public function setFunction($sFunction, $sArgs, $sScript) |
|
| 848 | { |
|
| 849 | return $this->addCommand( |
|
| 850 | array( |
|
| 851 | 'cmd' => 'sf', |
|
| 852 | 'func' => trim((string)$sFunction, " \t"), |
|
| 853 | 'prop' => trim((string)$sArgs, " \t") |
|
| 854 | ), |
|
| 855 | trim((string)$sScript, " \t\n") |
|
| 856 | ); |
|
| 857 | } |
|
| 858 | ||
| 859 | /** |
|
| 860 | * Add a command to construct a wrapper function around an existing javascript function on the browser |
|
| @@ 874-885 (lines=12) @@ | ||
| 871 | * |
|
| 872 | * @return \Jaxon\Plugin\Response |
|
| 873 | */ |
|
| 874 | public function wrapFunction($sFunction, $sArgs, $aScripts, $sReturnValueVar) |
|
| 875 | { |
|
| 876 | return $this->addCommand( |
|
| 877 | array( |
|
| 878 | 'cmd' => 'wpf', |
|
| 879 | 'func' => trim((string)$sFunction, " \t"), |
|
| 880 | 'prop' => trim((string)$sArgs, " \t"), |
|
| 881 | 'type' => trim((string)$sReturnValueVar, " \t") |
|
| 882 | ), |
|
| 883 | $aScripts |
|
| 884 | ); |
|
| 885 | } |
|
| 886 | ||
| 887 | /** |
|
| 888 | * Add a command to load a javascript file on the browser |
|