[TYPO3-core] RFC #6833: Possibility to add inline JS to page

Steffen Kamper steffen at sk-typo3.de
Mon Nov 26 10:39:23 CET 2007


"Martin Kutschker" <Martin.Kutschker at n0spam-blackbox.net> schrieb im 
Newsbeitrag 
news:mailman.1.1196069282.5861.typo3-team-core at lists.netfielders.de...
> 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
>
ah, now i see the second option of removeDefaultJS :-)

for naming i looked to headerData (TS) and additionalHeaderData(php) and i 
don't wanted to split the names again.
with includeJS it might be not clear that this is "inline" without the 
script-tags.

btw - using removeDefaultJS (!=external) could damage page anywhere - what 
is the advantage?

vg  Steffen 




More information about the TYPO3-team-core mailing list