src/Widget/Injector/HtmlInjector.php
/**
     * insert some HTML after the last javascript include.
     * If there is no JS anywhere, place it right before end of body.
     */
insert some HTML after the last javascript include.
If there is no JS anywhere, place it right before end of body.
insert some HTML after the last javascript include . If there is no JS anywhere place it right before end of body .
protected function jsTagsAfter(string $snippet, string $rawHtml): string
    {
        $result = self::injectAfterTagEnd($rawHtml, 'script', $snippet);
        if ($result === $rawHtml) {
            $result = self::injectBeforeTagEnd($rawHtml, 'body', $snippet);
        }
        return $result;
    }
protected function jsTagsAfter ( string $ snippet , string $ rawHtml ) : string { $ result = self :: injectAfterTagEnd ( $ rawHtml , 'script' , $ snippet ) ; if ( $ result === $ rawHtml ) { $ result = self :: injectBeforeTagEnd ( $ rawHtml , 'body' , $ snippet ) ; } return $ result ; }
insert some HTML after the last javascript include.
insert some HTML after the last javascript include .