Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:$wgLegacyJavaScriptGlobals

From mediawiki.org
Translate this page
Languages:
This feature was removed completely in version 1.37.0.
ResourceLoader: $wgLegacyJavaScriptGlobals
Whether or not to assign configuration variables to the global window object.
Introduced in version:1.18.0 (r87856)
Deprecated in version:1.35.0 (Gerrit change 618030;git #0b23e103)
Removed in version:1.37.0 (Gerrit change 678716;git #99d4ad59)
Allowed values:(boolean)
Default value:false (1.35-1.36)
true (1.18-1.34)
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'))
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:$wgLegacyJavaScriptGlobals&oldid=4540603"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp