public function extractExternalJavaScript($html)
    {
        $matches = array();

        preg_match_all(
            '!' . $this->getExternalJavaScriptRegex() . '!isU',
            $html, $matches
        );

        $links = $this->createJavaScriptPaths($matches['links']);

        return array('tags' => $matches[0], 'links' => $links);
    }
public function extractExternalJavaScript($html)
    {
        $matches = array();

        preg_match_all(
            '!' . $this->getExternalJavaScriptRegex() . '!isU',
            $html, $matches
        );

        $links = $this->createJavaScriptPaths($matches['links']);

        return array('tags' => $matches[0], 'links' => $links);
    }
public function extractExternalJavaScript ( $ html ) { $ matches = array ( ) ; preg_match_all ( '!' . $ this -> getExternalJavaScriptRegex ( ) . '!isU' , $ html , $ matches ) ; $ links = $ this -> createJavaScriptPaths ( $ matches [ 'links' ] ) ; return array ( 'tags' => $ matches [ 0 ] , 'links' => $ links ) ; }
Given a HTML string, find all the JS files that should be loaded.

@param  string $html
@return array
Given a HTML string find all the JS files that should be loaded .