[TYPO3-core] RFC #6833: Possibility to add inline JS to page
Steffen Kamper
steffen at sk-typo3.de
Mon Nov 26 12:44:34 CET 2007
"Martin Kutschker" <Martin.Kutschker at n0spam-blackbox.net> schrieb im
Newsbeitrag
news:mailman.1.1196075762.13695.typo3-team-core at lists.netfielders.de...
> Francois Suter schrieb:
>> Hi,
>>
>>> Please name it page.inlineJS to be in sync with TS page.includeJS.
>>
>> -1. The proposed construct does not work like page.includeJS, so I think
>> having a very close sounding name might cause confusion.
>
> Tghis is because the original property is wrong. If it'd be like that
> there would be no problem:
>
> page.header.javascript.js1.disposition = external
> page.header.javascript.js1.file = fileadmin/myfile.js
> page.header.javascript.js2.disposition = inline
> page.header.javascript.js2.text = TEXT
> page.header.javascript.js2.text.value = ...
>
> Note the page.header. This signifies we operate in the heaer section. So
> we can have a similiar javascript properties for the body. One for the
> start (right after the opening <body> tag and another one for the end
> (right before the closing </body> tag).
>
> Anyway, have it your way. Seems like I'm the only one who has a real
> problem with the TS property names.
>
> Masi
Hi Masi,
i really like your proposal, but for this a "bigger" change in the
JS-including is needed.
I did only the "small step" variant, so there is now possibility
* adding JS-files to header (includeJS)
* adding inline JS to the header (with possibility to external file)
* adding JS to body (with page.xxx)
a follow up will also give the possibility to move both after closing
body-tag,
maybe second option to move it before closing body tag if wanted.
Sure, this is only patch work.
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.
vg Steffen
More information about the TYPO3-team-core
mailing list