private function replaceJavaScriptTags($html, array $javaScriptFiles)
    {
        foreach ($javaScriptFiles['links'] as $key => $file) {
            if (!$this->isExternalJavaScriptFile($file)) {
                $html = str_replace(
                    $javaScriptFiles['tags'][$key],
                    $this->getJavaScriptContent($file),
                    $html
                );
            }
        }

        return $html;
    }