Summary: Register modules client side
           Product: MediaWiki
           Version: 1.18-svn
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: Resource Loader
        Depends on: 27535

See also bug 27535.

Being able to register modules on the client side will make it easier for users
to write custom scripts, for example:

register( 'myUserScript', {
    'wikiscripts': ['User:Krinkle/Calender.js',
    'wikistyles': 'User:Krinkle/Calender.css',
    'dependencies': ['jquery.ui.datepicker'],
    'messages': ['hist', 'talkpage', 'recentchanges', 'nstab-main']
mw.loader.load( 'myUserScript' );

.. would make 1 http request for all of that. Although this will make existing
things easier it also opens up good possibilities regarding the localization of
scripts. Right now it is either solved by keeping objects inside the scripts

'msg-clickhere' : {
'nl' : 'Klik hier',
'en': Click here'

Or an additional request to the API is made to action=query&meta=allmessages,
which brings in the extra complexity if having to wait for that to finish
(callback, fallback, errors).

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to