Jump to content
MediaWiki

Manual:$wgLegacyJavaScriptGlobals

From mediawiki.org
This page is a translated version of the page Manual:$wgLegacyJavaScriptGlobals and the translation is 56% complete.
Esta función se eliminó por completo en la versión 1.37.0.
ResourceLoader: $wgLegacyJavaScriptGlobals
Whether or not to assign configuration variables to the global window object.
Introducido en la versión:1.18.0 (r87856)
Desaconsejado en versión:1.35.0 (Gerrit change 618030; git #0b23e103)
Eliminado en la versión:1.37.0 (Gerrit change 678716; git #99d4ad59)
Valores permitidos:(booleano)
Valor predeterminado:false (1.35-1.36)
true (1.18-1.34)
Otras configuraciones: Alfabéticamente | Por Función

Detalles

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)...

o:

if(wgIsArticle)...

will no longer work and needs to use mw.config instead. For example:

if(mw.config.exists('wgRestrictionEdit'))

o:

if(mw.config.get('wgIsArticle'))

AltStyle によって変換されたページ (->オリジナル) /