To give an example:
mediawiki.page.ready.js runs on mobile (it specifies targets=>mobile) however attempts to lazy load the tablesorter plugin which is not available on mobile (it specifies targets=>desktop)
This currently throws an exception.
Avoiding a bike shedding conversation about whether jquery.tablesorter should be available on mobile, it is wrong to make the assumption that a module will always be available.
Expected: Instead of seeing an exception I would like to allow the user to handle the error themselves - allowing optional modules to die silently.
e.g.
mw.loader.using( 'jquery.tablesorter', function () {
$sortableTables.tablesorter();
}, function( e ) {
throw e;
});
or
mw.loader.using( 'jquery.tablesorter' ).done( function () {
$sortableTables.tablesorter();
});
Another example of this being a problem is on the edit page which asumes mediawiki.action.edit is available:
mw.loader.using("mediawiki.action.edit"
Currently there is a hack in MobileFrontend to get around this [1]
Version: 1.22.0
Severity: normal