[TYPO3-core] RFC #6833: Possibility to add inline JS to page
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Mon Nov 26 21:34:47 CET 2007
Ernesto Baschny [cron IT] schrieb:
>
> page.header.script.js1.src = fileadmin/myfile.js
> page.header.script.js2.content = TEXT
> page.header.script.js2.content.value = ...
>
> "src" to be in line with the XHTML attribute for the <script> tag and
> "content", well, because it is the content for the tag. While this will
> mainly be used for javascript, the XHTML tag is called <script>, which
> is why I would call the array-key like that too (instead of javascript),
> with a default of: type="text/javascript" (some crazy guy might want to
> use that for type="text/vbscript"). In my eyes, the disposition is
> implicit, which is why we don't need that information: having a "src"
> makes it external, with "content" it might be inline (default) or
> external (if a future config option "inlineScript2TempFile" is set).
>
> Somthing like that could be extended to "inline CSS" as well.
>
> page.header.stylesheet.css1.src = fileadmin/styles.css
> page.header.stylesheet.css2.content = TEXT
> page.header.stylesheet.css2.content.value = ...
I agree with all that you have written. I mean to your response to my post.
What's interesting here is that the inline JS and CSS code may NOT be
put together in one external file until they are next to each other. The
order of the code is imporant and must be preserved.
> But lets still leave something to work on in 4.3...
Well, I haven't time for that anyway :-(
Masi
More information about the TYPO3-team-core
mailing list