|
@@ 766-773 (lines=8) @@
|
| 763 |
|
* |
| 764 |
|
* @return Response |
| 765 |
|
*/ |
| 766 |
|
public function setFunction($sFunction, $sArgs, $sScript) |
| 767 |
|
{ |
| 768 |
|
$aAttributes = [ |
| 769 |
|
'func' => trim((string)$sFunction, " \t"), |
| 770 |
|
'prop' => trim((string)$sArgs, " \t") |
| 771 |
|
]; |
| 772 |
|
return $this->_addCommand('sf', $aAttributes, trim((string)$sScript, " \t\n")); |
| 773 |
|
} |
| 774 |
|
|
| 775 |
|
/** |
| 776 |
|
* Add a command to construct a wrapper function around an existing javascript function on the browser |
|
@@ 790-798 (lines=9) @@
|
| 787 |
|
* |
| 788 |
|
* @return Response |
| 789 |
|
*/ |
| 790 |
|
public function wrapFunction($sFunction, $sArgs, $aScripts, $sReturnValueVar) |
| 791 |
|
{ |
| 792 |
|
$aAttributes = [ |
| 793 |
|
'func' => trim((string)$sFunction, " \t"), |
| 794 |
|
'prop' => trim((string)$sArgs, " \t"), |
| 795 |
|
'type' => trim((string)$sReturnValueVar, " \t") |
| 796 |
|
]; |
| 797 |
|
return $this->_addCommand('wpf', $aAttributes, $aScripts); |
| 798 |
|
} |
| 799 |
|
|
| 800 |
|
/** |
| 801 |
|
* Add a command to load a javascript file on the browser |