Manual:$wgLegacyJavaScriptGlobals
Frontend: $wgLegacyJavaScriptGlobals | |
---|---|
Whether or not to assign configuration variables to the global window object. |
|
Introduced in version: | 1.18.0 (r87856) |
Removed in version: | still in use |
Allowed values: | (boolean) |
Default value: | false (1.35+)true (1.18-1.34) |
Other settings: Alphabetical | By function |
DetailsEdit
Whether or not to assign configuration variables to the global window object.
If this is set to false, old code using deprecated variables like:
if ( window.wgRestrictionEdit ) ...
or:
if ( wgIsArticle ) ...
will no longer work and needs to use mw.config instead. For example:
if ( mw.config.exists('wgRestrictionEdit') )
or:
if ( mw.config.get('wgIsArticle') )