2010/10/6 Junaid P V <[email protected]>:
> Hi,
>
> I had added two lines of code to load two separate scripts at last part of
> Common.js <http://ml.wikipedia.org/wiki/Mediawiki:Common.js> at
> ml.wilipedia. Those two scripts contain functions and variables declarations
> for transliteration tool in ml.wikipedia. Statements following that loading
> statements use functions and variables declared in loaded scripts. Scripts
> are get loaded perfectly in Firefox and IE transliteration is working but on
> Chrome they are not get loaded at proper time.
>
> On Chrome I get following error:
> Uncaught ReferenceError: transliterate is not defined
>
> transliterate is a function declared in
> Mediawiki:Transli.js<http://ml.wikipedia.org/wiki/%E0%B4%AE%E0%B5%80%E0%B4%A1%E0%B4%BF%E0%B4%AF%E0%B4%B5%E0%B4%BF%E0%B4%95%E0%B5%8D%E0%B4%95%E0%B4%BF:Transli.js>
>
> So, any problem with *importScript()* on Chrome?
>
I guess onload hooks fire before imported scripts in Chrome. You could
try using jQuery's document ready instead of addOnloadHook() and see
if that works.
Instead of addOnloadHook( function() { code here } ); do $j( document
).ready( function() { code here } );
Roan Kattouw (Catrope)
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l