Project

General

Profile

Actions

Feature #17850

closed

Possibility to add inline JS to page

Added by Steffen Kamper over 16 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
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

20071126_additionalInlineJS.diff (945 Bytes) 20071126_additionalInlineJS.diff Administrator Admin, 2007-11-26 09:53
Actions #1

Updated by Christian Kuhn over 15 years ago

This has been commited by Benni at 2007-11-29 in revision 2782.

Please set to closed and resolved.

Actions

Also available in: Atom PDF