Right now we have roughly this:
-- load.php?module=startup: function isCompatible() { .. } function startUp() { ..mw.loader.register( ... ); } if ( isCompatible() ) { .. script .. load.php?module=jquery|mediawiki } -- load.php?module=jquery|mediawiki * jquery.js * mediawiki.js - contains: if ( jQuery.isFunction( window.startUp ) ) { window.startUp(); } mw.loader.state({"jquery":"ready","mediawiki":"ready"});
With T107399 solved, the request for jquery|mediawiki is no longer blocking and now uses a dynamic script tag for which we can get a callback. Thus no longer needing the global function, nor for it to be manually called.