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

Steffen Kamper steffen at sk-typo3.de
Mon Nov 26 15:59:02 CET 2007


"Martin Kutschker" <Martin.Kutschker at n0spam-blackbox.net> schrieb im 
Newsbeitrag 
news:mailman.1.1196087291.30362.typo3-team-core at lists.netfielders.de...
> Steffen Kamper schrieb:
>> "Martin Kutschker" <Martin.Kutschker at n0spam-blackbox.net> schrieb im 
>> Newsbeitrag 
>> news:mailman.1.1196080058.17882.typo3-team-core at lists.netfielders.de...
>>> Steffen Kamper schrieb:
>>>> For naming there is the proposal to use "well-speaking" vars in php, so 
>>>> i thought it's good to do this also with TS-vars, also if they become 
>>>> longer.
>>> Long is good. It's just that I think that the "additional" is not 
>>> required at all. They are IMHO not "additional".
>>>
>>> Masi
>>
>> Hi Masi,
>>
>> it's good to discuss that because after it's may be difficult to change.
>> I also have big respect of your opinion as your TYPO3 knowledge is very 
>> high and you might see things in a more global aspect.
>
> I try to see that new names are either in sync with old ones or are really 
> meaningful to the intended audience.
>
>> I'm fine with the naming "inlineJS"
>> but then the description should be clear. My proposal:
>>
>> inlineJS    CARRAY    Inserts inline Javascript in the header-section. 
>> Don't se script-tags as they are added by TYPO3.
>>                                     Example:
>>                                     page.inlineJS.10 = TEXT
>>                                     page.inlineJS.10.value = function a 
>> (val) { alert(val); }
>>
>>                                     with config.removeDefaultJS=external 
>> the inlineJS is moved to external file.
>>                                     with config.minifyJS=1 the inlineJS 
>> will be minified as well.
>
> Fine.
>
>>                                     ATTENTION: if 
>> config.removeDefaultJS=1 is set, it removes all Javascript, also the 
>> inlineJS.
>
> What I meant in my initial post is that your patch is buggy in this 
> respect. If config.removeDefaultJS=1 than of course the contents of 
> page.inlineJS has to be inlined none the less.
>

So you mean that "DefaultJS" is only the generated one from TYPO3?
ok, then i will change that behavior and inlude it anyway.

> Of course we could also have a config.externalizeJS option. This would 
> affect default JS and page.inlineJS :-)
>
i think about making a whole concept for improving JS-Inclusion, up to this 
we have to live with the patchwork.
The problem with new concept is the compatibility, so all former settings 
should work.
May be this could be done in a seperate function, where "old" settings are 
checked and transformed to "new" settings.

>> btw - additionalHeaderData - it's the same issue, but i know, the cow, 
>> ...
>
> Ah, here come the "additional" again. Didn't think of that occurence.
>
yes, and i don't like it because of the inconsistence headerData <=> 
additionalHeaderData, but ok.


So i wait a bit if there comes a veto, if not i will create a new patch with 
renaming / take care of removeDefaultJS and description for doc.

vg  Steffen 




More information about the TYPO3-team-core mailing list