public static function renderJs($options = []) {
		$result = '';
		$list = [];
		$js = Application::get(['layout', 'js']);
		if (!empty($js)) {
			asort($js);
			foreach ($js as $k => $v) {
				$script = $k . (strpos($k, '?') !== false ? '&' : '?') . self::getVersion();
				$list[] = $script;
				$js_options = Application::get(['layout', 'js_options', $k]) ?? [];
				if (empty($js_options)) {
					$js_options['crossorigin'] = 'anonymous';
				}
				$js_options['type'] = 'text/javascript';
				$js_options['src'] = $script;
				$result.= \HTML::script($js_options);
			}
		}
		// list is needed for ajax form reloads
		if (!empty($options['return_list'])) {
			return $list;
		}
		return $result;
	}
public static function renderJs($options = []) {
		$result = '';
		$list = [];
		$js = Application::get(['layout', 'js']);
		if (!empty($js)) {
			asort($js);
			foreach ($js as $k => $v) {
				$script = $k . (strpos($k, '?') !== false ? '&' : '?') . self::getVersion();
				$list[] = $script;
				$js_options = Application::get(['layout', 'js_options', $k]) ?? [];
				if (empty($js_options)) {
					$js_options['crossorigin'] = 'anonymous';
				}
				$js_options['type'] = 'text/javascript';
				$js_options['src'] = $script;
				$result.= \HTML::script($js_options);
			}
		}
		// list is needed for ajax form reloads
		if (!empty($options['return_list'])) {
			return $list;
		}
		return $result;
	}
public static function renderJs ( $ options = [ ] ) { $ result = '' ; $ list = [ ] ; $ js = Application :: get ( [ 'layout' , 'js' ] ) ; if ( ! empty ( $ js ) ) { asort ( $ js ) ; foreach ( $ js as $ k => $ v ) { $ script = $ k . ( strpos ( $ k , '?' ) !== false ? '&' : '?' ) . self :: getVersion ( ) ; $ list [ ] = $ script ; $ js_options = Application :: get ( [ 'layout' , 'js_options' , $ k ] ) ?? [ ] ; if ( empty ( $ js_options ) ) { $ js_options [ 'crossorigin' ] = 'anonymous' ; } $ js_options [ 'type' ] = 'text/javascript' ; $ js_options [ 'src' ] = $ script ; $ result .= \ HTML :: script ( $ js_options ) ; } } // list is needed for ajax form reloads if ( ! empty ( $ options [ 'return_list' ] ) ) { return $ list ; } return $ result ; }
Render javascript files

@param array $options
boolean return_list
@return string
Render javascript files