https://bugzilla.wikimedia.org/show_bug.cgi?id=37894
Web browser: ---
Bug #: 37894
Summary: Get rid of startUp() function in mediawiki.js
Product: MediaWiki
Version: 1.17
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Unprioritized
Component: ResourceLoader
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
Right now we have roughly this:
-----------------------------------
-- load.php?module=startup
function isCompatible() {
..
}
function startUp() {
..mw.loader.register( ... );
}
if ( isCompatible() ) {
document.write( 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"});
-----------------------------------
Since the request for jquery/mediawiki is blocking, we can just put the
contents of startUp() after the load without needing the function.
This doesn't work right away though, due to the mw.loader.state() call. Because
if that is called before the registry is created it will create null-modules
with those names, causing an exception when the real registry is inserted.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l