[TYPO3-core] RFC #6833: Possibility to add inline JS to page
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Mon Nov 26 10:28:02 CET 2007
Steffen Kamper schrieb:
> Hi,
>
> this is a SVN patch request.
>
> Branches: Trunk only
>
> Bugtracker Reference:
> http://bugs.typo3.org/view.php?id=6833
>
> Feature:
> 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);
> }
> )
Please name it page.inlineJS to be in sync with TS page.includeJS.
I've not tested it but I think the code has a problem. The added JS is
aoppended to the default JS code, which may be removed via
config.removeDefaultJS. I don't think it's a problem if
config.removeDefaultJS=external affects the new JS, but it shouldn't be
discarded.
Masi
PS:
There is an error with the docs of page.inlineJS:
.style - setting the MIME type of the script (default: text/javascript)
It should read ".type" not ".style".
More information about the TYPO3-team-core
mailing list