Manual:$wgLegacyJavaScriptGlobals
From MediaWiki.org
| CSS/Js: $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: | true |
Other settings: Alphabetical | By Function
Details [edit]
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') )
| Language: | English • français |
|---|