ResourceLoader/Vocabulary

From MediaWiki.org
Jump to navigation Jump to search

Context[edit]

Web requests to load.php can specify values for these; ResourceLoader does so when it inserts load.php URLs in the HTML and JavaScript that it generates. PHP server code can retrieve their values through getDebug/Skin/Language() methods of ResourceLoaderContext. In the browser these usually map to debug, skin, and wgUserLanguage configuration values in mw.config.

debug
Also known as Development mode. See Debug mode for more information.
skin
The ID of the skin that the requesting page uses.
lang
The language code of the interface that the requesting page is displayed in.

Resources[edit]

Resource
Any part of a module (script file, stylesheet, interface message).
Message blob
A JSON blob containing the interface messages used by a module in a specific language.
Module
A bundle of one or more resources identified by a unique name.
Dependencies
One or more other modules that must load before current module.
Origin
The type of place a module's content comes from. This is used to determine whether a module is allowed in contexts with heightened security requirements. For example, user- or site-generated module code is not allowed on the Special:UserLogin or Special:Preferences pages.