#17850Possibility to add inline JS to page
Description
If you want to add inline JS, you normally have to include this manually with page.headerData.
This feature allows you to add inline JS with 2 ways
1) from TS
page.additionalInlineJS.1000 = TEXT
page.additionalInlineJS.1000.value (
function xyz (fff) {
alert(fff);
}
)
2) from php (e.g. Extension)
$GLOBALS[‘TSFE’]->additionalInlineJS[] = ‘
function aaaa(bbbb) {
alert(bbbb);
}
’;
The advantage is, that this inline code will
1) included to the other inline JS and, if configured, included in external file (removeDefaultJS)
2) will also minified if configured (minifyJS)
(issue imported from #M6833)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.