/**
* Extending the compile function to add the globals
*
* @access public
*/
function compile($view_var = 'script_foot', $script_tags = TRUE)
{
parent::compile($view_var, $script_tags);
$global_js = $this->inline('
document.documentElement.className += "js";
var EE = ' . json_encode($this->global_vars) . ';
if (typeof console === "undefined" || ! console.log) {
console = { log: function() { return false; }};
}
');
$this->CI->view->cp_global_js = $global_js;
}