|
@@ 874-885 (lines=12) @@
|
| 871 |
|
* |
| 872 |
|
* @return \Jaxon\Plugin\Response |
| 873 |
|
*/ |
| 874 |
|
public function includeScript($sFileName, $sType = null, $sId = null) |
| 875 |
|
{ |
| 876 |
|
$command = ['cmd' => 'in']; |
| 877 |
|
|
| 878 |
|
if(($sType)) |
| 879 |
|
$command['type'] = trim((string)$sType, " \t"); |
| 880 |
|
|
| 881 |
|
if(($sId)) |
| 882 |
|
$command['elm_id'] = trim((string)$sId, " \t"); |
| 883 |
|
|
| 884 |
|
return $this->addCommand($command, trim((string)$sFileName, " \t")); |
| 885 |
|
} |
| 886 |
|
|
| 887 |
|
/** |
| 888 |
|
* Add a command to include a javascript file on the browser if it has not already been loaded |
|
@@ 895-906 (lines=12) @@
|
| 892 |
|
* |
| 893 |
|
* @return \Jaxon\Plugin\Response |
| 894 |
|
*/ |
| 895 |
|
public function includeScriptOnce($sFileName, $sType = null, $sId = null) |
| 896 |
|
{ |
| 897 |
|
$command = ['cmd' => 'ino']; |
| 898 |
|
|
| 899 |
|
if(($sType)) |
| 900 |
|
$command['type'] = trim((string)$sType, " \t"); |
| 901 |
|
|
| 902 |
|
if(($sId)) |
| 903 |
|
$command['elm_id'] = trim((string)$sId, " \t"); |
| 904 |
|
|
| 905 |
|
return $this->addCommand($command, trim((string)$sFileName, " \t")); |
| 906 |
|
} |
| 907 |
|
|
| 908 |
|
/** |
| 909 |
|
* Add a command to remove a SCRIPT reference to a javascript file on the browser |