/**
  * @return string The HTML that should be displayed in the HTML footer (just before </html>)
  */
 public function getJsHtml()
 {
     $cssAndJsRegistry = tubepress_impl_patterns_sl_ServiceLocator::getCssAndJsRegistry();
     $scriptHandles = $cssAndJsRegistry->getScriptHandlesForDisplay();
     $scripts = array();
     foreach ($scriptHandles as $handle) {
         $script = $cssAndJsRegistry->getScript($handle);
         if ($script !== null) {
             $scripts[$handle] = $script;
         }
     }
     $jsHtml = $this->_fireEventAndReturnSubject(tubepress_api_const_event_EventNames::HTML_SCRIPTS_PRE, '') . "\n";
     $filteredScripts = $this->_fireEventAndReturnSubject(tubepress_api_const_event_EventNames::CSS_JS_SCRIPTS, $scripts);
     foreach ($filteredScripts as $handle => $info) {
         $jsHtml .= $this->_toJsTag($info);
     }
     $jsHtml = $this->_fireEventAndReturnSubject(tubepress_api_const_event_EventNames::HTML_SCRIPTS_POST, $jsHtml);
     return $jsHtml;
 }