RL and the use of mediaWiki global namespace

Jump to: navigation, search

Hi Timo,

Again, sorry to bother you but when I went over the JavaScript Globals it states that The only globals should be mediaWiki and jQuery ... all code should be written as an extension to either of these ....

Is their a global namespace register for RL so that with the respect to the mw/mediaWiki namespace it would be possible to register mw.smw and mw.srf (as part of the Semantic MediaWiki or Semantic Result Format extension family) and avoid potential namespace conflicts with the core or other extensions in future.

Of course I could just go like $.fn. ... but it might be nice to expose functions via mw.srf.util = util

Cheers,

mwjames

MWJames (talk)02:10, 30 August 2012

Maybe "mw.libs", which is described as "Empty object that plugins can be installed in" in the source code?

Helder14:03, 30 August 2012

I guess this doesn't really solves the problem as the issues is shifted only downward to mw.libs. Unless I'm missing something, there is a possibility that two different projects occupied the same namespace and using the same function name (virtually unlikely) which can potentially cause trouble.

The question was more directed towards something like Namespace registration as a non binding register for JS module names.

MWJames (talk)16:21, 30 August 2012