public function convertToString($html)
    {
        $externalJavaScript = $this->extractExternalJavaScript($html);

        return $this->replaceJavaScriptTags($html, $externalJavaScript);
    }
public function convertToString($html)
    {
        $externalJavaScript = $this->extractExternalJavaScript($html);

        return $this->replaceJavaScriptTags($html, $externalJavaScript);
    }
public function convertToString ( $ html ) { $ externalJavaScript = $ this -> extractExternalJavaScript ( $ html ) ; return $ this -> replaceJavaScriptTags ( $ html , $ externalJavaScript ) ; }
Extract all the linked JS files and put them in the proper place on the
given HTML string.

@param  string $html
@return string
Extract all the linked JS files and put them in the proper place on the given HTML string .