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

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Mon Nov 26 15:28:10 CET 2007


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.

Of course we could also have a config.externalizeJS option. This would 
affect default JS and page.inlineJS :-)

> btw - additionalHeaderData - it's the same issue, but i know, the cow, ...

Ah, here come the "additional" again. Didn't think of that occurence.

Masi


More information about the TYPO3-team-core mailing list