original_string: public function addOnReady($js)
      {
          if ($js instanceof jQuery_Chain) {
              $js = $js->getString();
          }
          if (!$this->atk4_initialised) {
              return parent::addOnReady($js);
          }
  
          $this->app->template->appendHTML('document_ready', "$.atk4(function(){ ".$js."; });\n");
  
          return $this;
      }
code: public function addOnReady($js)
      {
          if ($js instanceof jQuery_Chain) {
              $js = $js->getString();
          }
          if (!$this->atk4_initialised) {
              return parent::addOnReady($js);
          }
  
          $this->app->template->appendHTML('document_ready', "$.atk4(function(){ ".$js."; });\n");
  
          return $this;
      }
code_tokens: public function addOnReady ( $ js ) { if ( $ js instanceof jQuery_Chain ) { $ js = $ js -> getString ( ) ; } if ( ! $ this -> atk4_initialised ) { return parent :: addOnReady ( $ js ) ; } $ this -> app -> template -> appendHTML ( 'document_ready' , "$.atk4(function(){ " . $ js . "; });\n" ) ; return $ this ; }
docstring: Adds JS chain to DOM onReady event
  
  @param jQuery_Chain|string $js
  
  @return $this
docstring_tokens: Adds JS chain to DOM onReady event