From this documentation I can't tell if I should write
mw.loader.using('mediawiki.user.options', fn)
,mw.loader.using('mediaWiki.user.options', fn)
,mw.loader.using('mw.user.options', fn)
,mw.loader.using('user.options', fn)
, maybemw.loader.using('mediawiki.user', fn)
or possiblymw.loader.using('options', fn)
(I'm pretty sure I saw this somewhere).
In short, the list is a mess. I can't tell the difference between module names and function names that are part of a module. Or is this the same? Can I use 'mediawiki.util.addCSS'
as a module name even if it is a function? I can't tell. My proposed solution is to mark function calls with mediaWiki.a.b()
and module names with 'mediawiki.a.b'
(without the color, of course).
Also from what I know mw
is a shortcut for mediaWiki
and shouldn't be used in this list except for a single hint in the introduction. Or the other way around. But don't mix it, please.
Also I'm confused because it seems many of these mw.loader.using()
calls are pointless. Things like mw.user.options.get()
or mw.config.get()
work anyway, everywhere. Under what circumstances do they not work? How to replicate these circumstances?