Content deleted Content added
→importScript() vs mw.loader.load(): new section |
|||
Line 33:
* Is more restrictive, only allowing the loading of Wikipedia pages in the user or MediaWiki namespaces.
* Can load from other Wikimedia wikis, using a prefix such as "c" for "commons". For example, <code>importScript('c:User:YourName/test.js');</code>
* Makes your common.js file more readable, since it is less verbose.
mw.loader.load():
Line 39 ⟶ 40:
* Is less restrictive. Will load any URL from anywhere. So for example is good for loading from a local dev environment such as localhost.
* Can load from other Wikimedia wikis by adjusting the URL.
* Makes your common.js file less readable, since it is more verbose.
== See also ==
|