|
@@ 895-906 (lines=12) @@
|
| 892 |
|
* |
| 893 |
|
* @return \Jaxon\Plugin\Response |
| 894 |
|
*/ |
| 895 |
|
public function includeScript($sFileName, $sType = null, $sId = null) |
| 896 |
|
{ |
| 897 |
|
$command = array('cmd' => 'in'); |
| 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 include a javascript file on the browser if it has not already been loaded |
|
@@ 916-927 (lines=12) @@
|
| 913 |
|
* |
| 914 |
|
* @return \Jaxon\Plugin\Response |
| 915 |
|
*/ |
| 916 |
|
public function includeScriptOnce($sFileName, $sType = null, $sId = null) |
| 917 |
|
{ |
| 918 |
|
$command = array('cmd' => 'ino'); |
| 919 |
|
|
| 920 |
|
if(($sType)) |
| 921 |
|
$command['type'] = trim((string)$sType, " \t"); |
| 922 |
|
|
| 923 |
|
if(($sId)) |
| 924 |
|
$command['elm_id'] = trim((string)$sId, " \t"); |
| 925 |
|
|
| 926 |
|
return $this->addCommand($command, trim((string)$sFileName, " \t")); |
| 927 |
|
} |
| 928 |
|
|
| 929 |
|
/** |
| 930 |
|
* Add a command to remove a SCRIPT reference to a javascript file on the browser |