Actions
Feature #17850
closedPossibility to add inline JS to page
Start date:
2007-11-26
Due date:
% Done:
0%
Estimated time:
PHP Version:
5.2
Tags:
Complexity:
Sprint Focus:
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)
Files
Actions