Skip to content

Commit

Permalink
Merge pull request #3 from mitydigital/feature/js-attributes
Browse files Browse the repository at this point in the history
Add additional attributes for scripts
  • Loading branch information
martyf authored Dec 30, 2024
2 parents 15e9928 + ed9907a commit c9f782d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Tags/Concerns/Scripts.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ protected function scriptsLoad($location)
$script .= ' defer';
}

if (isset($javascript['additional_attributes']) && $javascript['additional_attributes']) {
$script .= ' ' . $javascript['additional_attributes'];
}

$script .= ' src="'.$javascript['src'].'"></script>';

return $script;
Expand Down

0 comments on commit c9f782d

Please sign in to comment.