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

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


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);
  }
)

2) from php (e.g. Extension)
$GLOBALS['TSFE']->additionalInlineJS[] = '
    function aaaa(bbbb) {
        alert(bbbb);
    }
';

The advantage is, that this inline code will
1) included to the other inline JS and, if configured, included in external 
file (removeDefaultJS)

2) will also minified if configured (minifyJS)

vg  Steffen



begin 666 20071126_additionalInlineJS.diff
M26YD97 at Z('1Y<&\S+W-Y<V5X="]C;7,O='-L:6(O8VQA<W,N='-L:6)?<&%G
M96=E;BYP:' -"CT]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]
M/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T]/3T-"BTM+2!T>7!O,R]S
M>7-E>'0O8VUS+W1S;&EB+V-L87-S+G1S;&EB7W!A9V5G96XN<&AP"2AR979I
M<VEO;B R-S8V*0T**RLK('1Y<&\S+W-Y<V5X="]C;7,O='-L:6(O8VQA<W,N
M='-L:6)?<&%G96=E;BYP:' )*'=O<FMI;F<@8V]P>2D-"D! ("TW-C L-R K
M-S8P+#(R($! #0H@"0E]"B )"2<["B )"7T*+0HK"0D**PD)+R]A9&0 at 861D
M:71I;VYA;"!I;FQI;F4 at 2E,**PD)"BL)"2\O(&1E9FEN960@:6X at 5%,@=VET
M:"!P86=E+F%D9&ET:6]N86Q);FQI;F5*4PHK"0EI9B H:7-?87)R87DH)$=,
M3T)!3%-;)U131D4G72T^<%-E='5P6R=A9&1I=&EO;F%L26YL:6YE2E,N)UTI
M*0E["BL)"0DD1TQ/0D%,4ULG5%-&12==+3YA9&1I=&EO;F%L26YL:6YE2E-;
M73T@)$=,3T)!3%-;)U131D4G72T^8T]B:BT^8T]B:D=E="@D1TQ/0D%,4ULG
M5%-&12==+3YP4V5T=7!;)V%D9&ET:6]N86Q);FQI;F5*4RXG72PG861D:71I
M;VYA;$EN;&EN94I3+B<I.PHK"0E]"BL)"2\O(&1E9FEN960@:6X@<&AP"BL)
M"6EF*&ES7V%R<F%Y*"1'3$]"04Q36R=44T9%)UTM/F%D9&ET:6]N86Q);FQI
M;F5*4RDI('L**PD)"69O<F5A8V at H)$=,3T)!3%-;)U131D4G72T^861D:71I
M;VYA;$EN;&EN94I3(&%S("1K97D]/B1V86PI('L**PD)"0EI9B at A:7-?87)R
M87DH)'9A;"DI('L**PD)"0D))%]S8W)I<'1#;V1E("X](&-H<B at Q,"DN)'9A
M;"YC:'(H,3 I.PD**PD)"0E]"BL)"0E]"BL)"7T**PD)"B )"2\O(%-H;W5L
M9"!M:6YI9GD_"B )"6EF("@D1TQ/0D%,4ULG5%-&12==+3YC;VYF:6=;)V-O
M;F9I9R==6R=M:6YI9GE*4R==*2!["B )"0DD;6EN:69Y17)R;W(@/2 G)SL*
`
end



More information about the TYPO3-team-core mailing list