public function addOnReady($js) { if (is_object($js)) { $js = $js->getString(); } $this->app->template->appendHTML('document_ready', $js . ";\n"); return $this; }
function addOnReady($js) { if (is_object($js)) { $js = $js->getString(); } if (!$this->atk4_initialised) { return parent::addOnReady($js); } $this->api->template->append('document_ready', "\$.atk4(function(){ " . $js . "; });\n"); return $this; }