Template:Install user script/doc: Difference between revisions

Content deleted Content added
add "importScript() is not deprecated" section and explanation
add
Line 19:
 
== importScript() is not deprecated ==
There is some confusion about whether or not importScript() is deprecated. The answer is that it is '''not''' deprecated.
In 2015, importScript() was [[gerrit:c/mediawiki/core/+/203293|deprecated for one week]], and then [[gerrit:c/mediawiki/core/+/206078/|the action was reversed]]. In 2022, a [[gerrit:c/mediawiki/core/+/820828|bug causing importScript() to not work for mobile users]] was fixed. As of 2022, the latest statement by software engineers on the deprecation is [[phab:T27845#8135189]], which states {{TQ|For local imports, call importScript(). This is not, and never was, deprecated. For cross-wiki and other less trivial use cases, call mw.loader.load().}}
 
In 2015, importScript() was [[gerrit:c/mediawiki/core/+/203293|deprecated for one week]], and then [[gerrit:c/mediawiki/core/+/206078/|the action was reversed]]. In 2022, a [[gerrit:c/mediawiki/core/+/820828|bug causing importScript() to not work for mobile users]] was fixed. As of 2022, the latest statement by software engineers on the deprecation is [[phab:T27845#8135189]], which states {{TQ|For local imports, call importScript(). This is not, and never was, deprecated. For cross-wiki and other less trivial use cases, call mw.loader.load().}} In conclusion, importScript() is not deprecated, and editors should feel free to use it. It does not need to be systematically replaced by mw.loader.load(), and {{T|iusc}} does not need to be replaced with {{T|lusc}}.
 
== See also ==