| lang | php |
|---|
class EE_Javascript
The library is loaded using the following code:
ee()->load->library('javascript');
| Parameter | Type | Description |
|---|---|---|
| $var | String |
The variable name to add to the EE javascript object |
| $val | String |
The value of the variable being added |
| Returns | Void |
Add a variable to the EE javascript object. Useful if you need to dynamically set variables for your external script. Will intelligently resolve namespaces (i.e. filemanager.filelist) so please use them.
| Parameter | Type | Description |
|---|---|---|
| $view_var | String |
The element to attach the foot to |
| $script_tags | Boolean |
Set to TRUE to output the <script> tags, otherwise doesn't add them |
| Returns | Void |
Gather together all scripts needing to be output for the given $view_var.
| Parameter | Type | Description |
|---|---|---|
| Returns | String |
The HTML markup containing our JS |
Prepares and returns the HTML+JS for injecting variables into the EE namespace.
| Parameter | Type | Description |
|---|---|---|
| Returns | String |
The HTML markup containing our foot JS |
Prepares and returns the JS to be output in the foot.