Turbolinks compatibility (#1320)

This commit is contained in:
TinaH 2022-06-08 17:03:05 +02:00 committed by GitHub
parent e7c3f56e54
commit 814b36a08a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -63,11 +63,11 @@ class JavascriptRenderer extends BaseJavascriptRenderer
$cssRoute = preg_replace('/\Ahttps?:/', '', $cssRoute);
$jsRoute = preg_replace('/\Ahttps?:/', '', $jsRoute);
$html = "<link rel='stylesheet' type='text/css' property='stylesheet' href='{$cssRoute}'>";
$html .= "<script src='{$jsRoute}'></script>";
$html = "<link rel='stylesheet' type='text/css' property='stylesheet' href='{$cssRoute}' data-turbolinks-eval='false' data-turbo-eval='false'>";
$html .= "<script src='{$jsRoute}' data-turbolinks-eval='false' data-turbo-eval='false'></script>";
if ($this->isJqueryNoConflictEnabled()) {
$html .= '<script>jQuery.noConflict(true);</script>' . "\n";
$html .= '<script data-turbo-eval="false">jQuery.noConflict(true);</script>' . "\n";
}
$html .= $this->getInlineHtml();