function js($flush = true) {
        $js = $this->_js;
        if ($flush) $this->_js = [];
        $html = '';
        foreach ($js as $url => $inc) {
            $html .= '<script src="'.$url.'"></script>'.PHP_EOL;
        }
        if (!empty($this->_scripts)) {
            $scripts = $this->_scripts;
            if ($flush) $this->_scripts = [];
            $html .= '<script>'.PHP_EOL;
            foreach ($scripts as $script) {
                $html .= $script . PHP_EOL;
            }
            $html .= '</script>';
        }
        return $html;
    }