src/WebLibraryManager.php
public function addAdditionalScript($additionalScript): void
    {
        if (!$additionalScript instanceof HtmlElementInterface) {
            $additionalScript = new HtmlString($additionalScript);
        }
        $this->webLibraries[] = new InlineWebLibrary(null, null, $additionalScript);
    }
public function addAdditionalScript($additionalScript): void
    {
        if (!$additionalScript instanceof HtmlElementInterface) {
            $additionalScript = new HtmlString($additionalScript);
        }
        $this->webLibraries[] = new InlineWebLibrary(null, null, $additionalScript);
    }
public function addAdditionalScript ( $ additionalScript ) : void { if ( ! $ additionalScript instanceof HtmlElementInterface ) { $ additionalScript = new HtmlString ( $ additionalScript ) ; } $ this -> webLibraries [ ] = new InlineWebLibrary ( null , null , $ additionalScript ) ; }
Adds an additional script at the end of the &lt;head&gt; tag.
The provided script can either be a string or an object implementing HtmlElementInterface.

@param string|HtmlElementInterface $additionalScript
Adds an additional script at the end of the &lt ; head&gt ; tag . The provided script can either be a string or an object implementing HtmlElementInterface .