public function buildScript($src, $async = false)
    {
        // Build the script element
        $script = $this->buildHtmlElement($name = 'script', $value = '', $id = '', $class = '');
        $script->attr('src', $src);
        $script->attr('async', $async);

        // Return the script
        return $script;
    }
public function buildScript($src, $async = false)
    {
        // Build the script element
        $script = $this->buildHtmlElement($name = 'script', $value = '', $id = '', $class = '');
        $script->attr('src', $src);
        $script->attr('async', $async);

        // Return the script
        return $script;
    }
public function buildScript ( $ src , $ async = false ) { // Build the script element $ script = $ this -> buildHtmlElement ( $ name = 'script' , $ value = '' , $ id = '' , $ class = '' ) ; $ script -> attr ( 'src' , $ src ) ; $ script -> attr ( 'async' , $ async ) ; // Return the script return $ script ; }
Build an html script element.

@param string $src   The script src attribute.
@param bool   $async The script async attribute.

@return HTMLElement

@throws Exception
Build an html script element .