Tim Starling <tstarling <at> wikimedia.org> writes:
> * Unnecessary use of the global namespace. The jQuery style is nice,
> with local functions inside an anonymous closure:
>
> function () {
> function setup() {
> ...
> }
> addOnloadHook( setup );
> }();
This would make it impossible to overwrite the function locally on a wiki, which
is done sometimes, either because it conflicts with some local script, or for
better localization (such as changing the sorting algorithm in the
sortable-table script to handle non-ASCII characters decently). You should
rather use a global MediaWiki object, that works just as well for clearing the
global namespace, and it leaves the functions accessible.
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l